-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the code for the starter, as currently generated with nuxt init + storybook init combo. <!-- ☝️ PR title should follow conventional commits (https://conventionalcommits.org). In particular, the title should start with one of the following types: - docs: 📖 Documentation (updates to the documentation or readme) - fix: 🐞 Bug fix (a non-breaking change that fixes an issue) - feat: ✨ New feature/enhancement (a non-breaking change that adds functionality or improves existing one) - feat!/fix!:⚠️ Breaking change (fix or feature that would cause existing functionality to change) - chore: 🧹 Chore (updates to the build process or auxiliary tools and libraries) --> ### 🔗 Linked issue <!-- If it resolves an open issue, please link the issue here. For example "Resolves #123" --> ### 📚 Description <!-- Describe your changes in detail --> <!-- Why is this change required? What problem does it solve? -->
- Loading branch information
1 parent
a4ab1f1
commit 23c52c6
Showing
20 changed files
with
215 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,4 @@ logs | |
.env.* | ||
!.env.example | ||
|
||
*storybook.log | ||
*storybook.log |
10 changes: 4 additions & 6 deletions
10
examples/starter/.storybook/main.js → examples/starter/.storybook/main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
/** @type { import('storybook-vue').StorybookConfig } */ | ||
const config = { | ||
import type { StorybookConfig } from '@storybook-vue/nuxt' | ||
|
||
const config: StorybookConfig = { | ||
stories: [ | ||
'../components/**/*.mdx', | ||
'../components/**/*.stories.@(js|jsx|ts|tsx|mdx)', | ||
], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
], | ||
framework: { | ||
name: '@storybook-vue/nuxt', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
} | ||
export default config |
4 changes: 3 additions & 1 deletion
4
examples/starter/.storybook/preview.js → examples/starter/.storybook/preview.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<template> | ||
<div> | ||
<NuxtRouteAnnouncer /> | ||
<NuxtWelcome /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 6 additions & 9 deletions
15
...arter/components/MyNuxtWelcome.stories.js → ...arter/components/MyNuxtWelcome.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
import type { Meta, StoryObj } from '@storybook/vue3' | ||
|
||
import MyNuxtWelcome from './MyWelcome.vue' | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/vue/writing-stories/introduction | ||
|
||
const meta = { | ||
title: 'Example/NuxtWelcome', | ||
component: MyNuxtWelcome, | ||
// This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/vue/writing-docs/autodocs | ||
tags: ['autodocs'], | ||
} | ||
} satisfies Meta<typeof MyNuxtWelcome> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
/* | ||
*👇 Render functions are a framework specific feature | ||
to allow you control on how the component renders. | ||
* See https://storybook.js.org/docs/vue/api/csf | ||
* to learn how to use render functions. | ||
*/ | ||
|
||
export const NuxtWelcomeStory = { | ||
export const NuxtWelcomeStory: Story = { | ||
args: {}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,40 @@ | ||
<template> | ||
<h1>Welcome Nuxt to Storybook :</h1> | ||
<h1>Welcome Nuxt to Storybook</h1> | ||
<NuxtWelcome /> | ||
</template> | ||
|
||
<style> | ||
.readmore { | ||
-webkit-text-size-adjust: 100%; | ||
tab-size: 4; | ||
box-sizing: border-box; | ||
border-width: 0; | ||
border-style: solid; | ||
border-color: #e0e0e0; | ||
--tw-ring-inset: var(--tw-empty,); | ||
--tw-ring-offset-width: 0px; | ||
--tw-ring-offset-color: #fff; | ||
--tw-ring-color: rgba(14, 165, 233, 0.5); | ||
--tw-ring-offset-shadow: 0 0 #0000; | ||
--tw-ring-shadow: 0 0 #0000; | ||
--tw-shadow: 0 0 #0000; | ||
font-family: | ||
'Nunito Sans', | ||
-apple-system, | ||
'.SFNSText-Regular', | ||
'San Francisco', | ||
BlinkMacSystemFont, | ||
'Segoe UI', | ||
'Helvetica Neue', | ||
Helvetica, | ||
Arial, | ||
sans-serif; | ||
margin: 0; | ||
-webkit-font-smoothing: antialiased; | ||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
line-height: 24px; | ||
color: #029cfd; | ||
text-decoration: none; | ||
font-size: 14px; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.