Skip to content

Commit

Permalink
chore: rename NuxtExampleLayout to NuxtExample
Browse files Browse the repository at this point in the history
  • Loading branch information
arashsheyda committed Dec 19, 2023
1 parent 38877a7 commit c94d076
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 44 deletions.
4 changes: 2 additions & 2 deletions examples/advanced/config-extends/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const bar = getBar()
</script>

<template>
<NuxtExampleLayout dir="advanced/config-extends" file="nuxt.config.ts">
<NuxtExample dir="advanced/config-extends" file="nuxt.config.ts">
appConfig:
<pre>{{ JSON.stringify(appConfig, null, 2) }}</pre>
runtimeConfig:
Expand All @@ -20,5 +20,5 @@ const bar = getBar()
{{ foo }} {{ bar }}
<br>
{{ $myPlugin() }}
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/error-handling/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function triggerError() {
</script>

<template>
<NuxtExampleLayout dir="advanced/error-handling" current-route>
<NuxtExample dir="advanced/error-handling" current-route>
<template #nav>
<NuxtLink to="/" class="n-link-base">
Home
Expand All @@ -37,5 +37,5 @@ function triggerError() {
</button>
</template>
<NuxtPage />
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/error-handling/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function handleError() {
</script>

<template>
<NuxtExampleLayout>
<NuxtExample>
<div class="relative font-sans">
<div class="container max-w-200 mx-auto py-10 px-4">
<h1>{{ error?.message }}</h1>
Expand All @@ -29,5 +29,5 @@ function handleError() {
</NuxtLink>
</div>
</div>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/jsx/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const InlineComponent = () => (
</script>

<template>
<NuxtExampleLayout dir="advanced/jsx" icon="i-simple-icons-react">
<NuxtExample dir="advanced/jsx" icon="i-simple-icons-react">
<InlineComponent />
<!-- Defined in components/jsx-component.ts -->
<MyComponent message="This is an external JSX component" />
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/locale/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const date = useLocaleDate(new Date('2016-10-26') /* NUXT_BIRTHDAY */)
</script>

<template>
<NuxtExampleLayout dir="advanced/locale">
<NuxtExample dir="advanced/locale">
<div class="flex justify-center gap-8 items-center mt-2">
<USelect v-model="locale" :options="locales" icon="i-heroicons-calendar-days" />
<p class="text-4xl">
{{ date }}
</p>
</div>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/module-extend-pages/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NuxtExampleLayout dir="advanced/module-extend-pages" file="pages/index.vue">
<NuxtExample dir="advanced/module-extend-pages" file="pages/index.vue">
<slot />
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/teleport/app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NuxtExampleLayout dir="advanced/teleport">
<NuxtExample dir="advanced/teleport">
<div>
<!-- SSR Teleport -->
<Teleport to="body">
Expand All @@ -22,5 +22,5 @@
Hello from Modal teleport!
</MyModal>
</div>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/testing/app.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<NuxtExampleLayout dir="advanced/testing">
<NuxtExample dir="advanced/testing">
<div class="text-7xl">
Hello Nuxt!
</div>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/use-cookie/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const logout = () => {
</script>

<template>
<NuxtExampleLayout class="h-50" dir="advanced/use-cookie">
<NuxtExample class="h-50" dir="advanced/use-cookie">
<template v-if="user">
<h1 class="text-3xl mb-3">
Welcome, {{ user.name }}! 👋
Expand Down Expand Up @@ -48,5 +48,5 @@ const logout = () => {
</UButton>
</div>
</template>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/advanced/use-custom-fetch-composable/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ const { data } = await useCustomFetch<[]>('/contributors')
</script>

<template>
<NuxtExampleLayout dir="advanced/use-custom-fetch-composable" file="composables/useCustomFetch.ts">
<NuxtExample dir="advanced/use-custom-fetch-composable" file="composables/useCustomFetch.ts">
<h1 class="text-xl">
- Nuxt custom fetch:
</h1>
<div class="max-h-96 overflow-auto mt-4 p-4 border border-gray-200 dark:border-gray-800 rounded-lg">
<pre class="text-left text-xs">{{ data }}</pre>
</div>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/auth/local/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const icon = computed(() => $auth.session.value?.email ? 'i-heroicons-lock-open'
</script>

<template>
<NuxtExampleLayout dir="auth/local" :icon="icon">
<NuxtExample dir="auth/local" :icon="icon">
<template #nav>
<NuxtLink to="/">Home</NuxtLink>
<NuxtLink to="/secret">Secret</NuxtLink>
Expand All @@ -15,5 +15,5 @@ const icon = computed(() => $auth.session.value?.email ? 'i-heroicons-lock-open'
<NuxtPage />
<!-- to show toasts -->
<UNotifications />
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/experimental/wasm/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { data } = await useAsyncData(
</script>

<template>
<NuxtExampleLayout dir="experimental/wasm">
<NuxtExample dir="experimental/wasm">
<p>
<code>a = {{ a }}</code>
</p>
Expand All @@ -20,5 +20,5 @@ const { data } = await useAsyncData(
<br>
<code>{{ a }} + {{ b }} = {{ data.sum }}</code>
</p>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/features/auto-imports/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ function hello () {
</script>

<template>
<NuxtExampleLayout dir="features/auto-imports">
<NuxtExample dir="features/auto-imports">
<h1>Demo with auto imports</h1>
<form class="flex gap-2" @submit.prevent="hello">
<CustomInput v-model="message" />
<UButton type="submit">Hello</UButton>
</form>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/features/data-fetching/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const nav = [
</script>

<template>
<NuxtExampleLayout dir="features/data-fetching" :nav="nav">
<NuxtExample dir="features/data-fetching" :nav="nav">
<!-- Show Nuxt progress indicator on page change -->
<NuxtLoadingIndicator />
<NuxtPage />
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/features/layouts/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const nav = [


<template>
<NuxtExampleLayout dir="features/layouts" :nav="nav">
<NuxtExample dir="features/layouts" :nav="nav">
<NuxtLayout class="layouts">
<NuxtPage />
</NuxtLayout>
Expand All @@ -27,7 +27,7 @@ const nav = [
Remove layout
</UButton>
</div>
</NuxtExampleLayout>
</NuxtExample>
</template>

<style scoped>
Expand Down
4 changes: 2 additions & 2 deletions examples/features/meta-tags/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ useHead({
</script>

<template>
<NuxtExampleLayout dir="features/meta-tags" file="pages/index.vue">
<NuxtExample dir="features/meta-tags" file="pages/index.vue">
<NuxtPage />
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/features/state-management/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ const sameCounter = useState('counter')
</script>

<template>
<NuxtExampleLayout dir="features/state-management">
<NuxtExample dir="features/state-management">
<p>Counter: {{ counter }}</p>
<div class="flex gap-2 my-4">
<UButton @click="counter--">-</UButton>
<UButton @click="counter++">+</UButton>
</div>
<p>Same Counter: {{ sameCounter }}</p>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/routing/middleware/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const route = useRoute()
</script>

<template>
<NuxtExampleLayout dir="routing/middleware" :nav="nav">
<NuxtExample dir="routing/middleware" :nav="nav">
<NuxtPage />
<template #footer>
<div class="text-center p-4 op-50">
Current route: <UKbd>{{ route.path }}</UKbd>
</div>
</template>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/routing/pages/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const nav = [
</script>

<template>
<NuxtExampleLayout dir="routing/pages" :nav="nav" current-route>
<NuxtExample dir="routing/pages" :nav="nav" current-route>
<NuxtLoadingIndicator />
<NuxtPage />
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/routing/universal-router/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const timer = useState('timer', () => 0)
</script>

<template>
<NuxtExampleLayout dir="routing/universal-router" current-route>
<NuxtExample dir="routing/universal-router" current-route>
A page...
<br>

Expand All @@ -29,5 +29,5 @@ const timer = useState('timer', () => 0)
</template>
</NuxtLink>
</template>
</NuxtExampleLayout>
</NuxtExample>
</template>
4 changes: 2 additions & 2 deletions examples/ui/sass/app.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<NuxtExampleLayout>
<NuxtExample>
<Head>
<Title>Nuxt with SASS</Title>
</Head>
<NuxtPage />
</NuxtExampleLayout>
</NuxtExample>
</template>

<style lang="sass">
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions shared/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "@nuxt/examples-ui",
"version": "0.0.1",
"version": "0.0.2",
"private": false,
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"start": "nuxi preview"
"start": "nuxi preview",
"prepare": "nuxi prepare"
},
"main": "./nuxt.config.ts",
"files": [
Expand Down
3 changes: 3 additions & 0 deletions shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./.nuxt/tsconfig.json"
}

0 comments on commit c94d076

Please sign in to comment.