File tree Expand file tree Collapse file tree 7 files changed +1119
-13
lines changed Expand file tree Collapse file tree 7 files changed +1119
-13
lines changed Original file line number Diff line number Diff line change @@ -40,3 +40,6 @@ yarn-error.log*
40
40
* .tsbuildinfo
41
41
next-env.d.ts
42
42
.sources.stamp
43
+
44
+ * storybook.log
45
+ storybook-static
Original file line number Diff line number Diff line change
1
+ import type { StorybookConfig } from '@storybook/nextjs' ;
2
+
3
+ const config : StorybookConfig = {
4
+ "stories" : [
5
+ "../src/**/*.mdx" ,
6
+ "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
7
+ ] ,
8
+ "addons" : [ ] ,
9
+ "framework" : {
10
+ "name" : "@storybook/nextjs" ,
11
+ "options" : { }
12
+ } ,
13
+ "staticDirs" : [
14
+ "../public"
15
+ ]
16
+ } ;
17
+ export default config ;
Original file line number Diff line number Diff line change
1
+ import type { Preview } from '@storybook/nextjs'
2
+
3
+ const preview : Preview = {
4
+ parameters : {
5
+ controls : {
6
+ matchers : {
7
+ color : / ( b a c k g r o u n d | c o l o r ) $ / i,
8
+ date : / D a t e $ / i,
9
+ } ,
10
+ } ,
11
+ } ,
12
+ } ;
13
+
14
+ export default preview ;
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ // For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
2
+ import storybook from "eslint-plugin-storybook" ;
3
+
1
4
import { dirname } from "path" ;
2
5
import { fileURLToPath } from "url" ;
3
6
import { FlatCompat } from "@eslint/eslintrc" ;
@@ -11,6 +14,7 @@ const compat = new FlatCompat({
11
14
12
15
const eslintConfig = [
13
16
...compat . extends ( "next/core-web-vitals" , "next/typescript" ) ,
17
+ ...storybook . configs [ "flat/recommended" ]
14
18
] ;
15
19
16
20
export default eslintConfig ;
Original file line number Diff line number Diff line change 9
9
"lint" : " next lint" ,
10
10
"export" : " GITHUB_PAGES=true next build" ,
11
11
"serve-static" : " npx serve out" ,
12
- "deploy-gh-pages" : " GITHUB_PAGES=true next build && gh-pages -d out --nojekyll -e chat -f"
12
+ "deploy-gh-pages" : " GITHUB_PAGES=true next build && gh-pages -d out --nojekyll -e chat -f" ,
13
+ "storybook" : " storybook dev -p 6006" ,
14
+ "build-storybook" : " storybook build"
13
15
},
14
16
"dependencies" : {
15
17
"@radix-ui/react-dropdown-menu" : " ^2.1.14" ,
27
29
},
28
30
"devDependencies" : {
29
31
"@eslint/eslintrc" : " ^3" ,
32
+ "@storybook/nextjs" : " ^9.0.17" ,
30
33
"@tailwindcss/postcss" : " ^4" ,
31
34
"@types/node" : " ^20" ,
32
35
"@types/react" : " ^19" ,
33
36
"@types/react-dom" : " ^19" ,
34
37
"eslint" : " ^9" ,
35
38
"eslint-config-next" : " 15.2.4" ,
39
+ "eslint-plugin-storybook" : " ^9.0.17" ,
36
40
"gh-pages" : " ^6.3.0" ,
41
+ "storybook" : " ^9.0.17" ,
37
42
"tailwindcss" : " ^4" ,
38
43
"tw-animate-css" : " ^1.3.0" ,
39
44
"typescript" : " ^5"
40
45
}
41
- }
46
+ }
Original file line number Diff line number Diff line change
1
+ import type { Meta , StoryObj } from "@storybook/nextjs" ;
2
+ import "../app/globals.css" ;
3
+
4
+ import MessageInput from "../components/message-input" ;
5
+
6
+ const meta = {
7
+ title : "Components/MessageInput" ,
8
+ component : MessageInput ,
9
+ parameters : {
10
+ // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
11
+ layout : "centered" ,
12
+ } ,
13
+ } satisfies Meta < typeof MessageInput > ;
14
+
15
+ export default meta ;
16
+ type Story = StoryObj < typeof meta > ;
17
+
18
+ export const Default : Story = {
19
+ args : {
20
+ onSendMessage : ( ) => { } ,
21
+ } ,
22
+ } ;
You can’t perform that action at this time.
0 commit comments