Skip to content

Commit 5043cf6

Browse files
authored
Merge pull request #12957 from TylerAPfledderer/feat/bump-storybook-to-v8
feat(storybook): bump to v8
2 parents 9fe3b2d + 1637649 commit 5043cf6

File tree

9 files changed

+2157
-1685
lines changed

9 files changed

+2157
-1685
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,7 @@ robots.txt
5656

5757
# Crowdin report output
5858
src/data/crowdin/bucketsAwaitingReviewReport.csv
59+
60+
# Storybook
61+
build-storybook.log
62+
storybook-static

.storybook/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const config: StorybookConfig = {
2222
"@storybook/addon-essentials",
2323
"@storybook/addon-interactions",
2424
"storybook-react-i18next",
25+
"@chromatic-com/storybook"
2526
],
2627
staticDirs: ["../public"],
2728
framework: {
@@ -68,6 +69,8 @@ const config: StorybookConfig = {
6869
return !(isStyledSystemProp || isHTMLElementProp)
6970
},
7071
},
72+
73+
reactDocgen: "react-docgen-typescript"
7174
},
7275
}
7376
export default config

chromatic.config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projectId": "Project:6629cd26b1440f2cc20b94c0",
3+
"zip": true,
4+
"buildScriptName": "build-storybook:chromatic"
5+
}

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
publish = ".next"
88

99
# Default build command.
10-
command = "yarn build"
10+
command = "yarn add sharp --ignore-engines && yarn build"
1111

1212
[build.environment]
1313
NEXT_FORCE_EDGE_IMAGES="true"

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"crowdin-contributors": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/crowdin/getCrowdinContributors.ts",
1616
"storybook": "storybook dev -p 6006",
1717
"build-storybook": "storybook build",
18+
"build-storybook:chromatic": "storybook build --test",
1819
"chromatic": "chromatic --project-token fee8e66c9916",
1920
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
2021
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",
@@ -61,34 +62,35 @@
6162
},
6263
"devDependencies": {
6364
"@chakra-ui/cli": "^2.4.1",
65+
"@chromatic-com/storybook": "1.5.0",
6466
"@netlify/plugin-nextjs": "^5.0.0",
65-
"@storybook/addon-essentials": "7.6.6",
66-
"@storybook/addon-interactions": "7.6.6",
67-
"@storybook/addon-links": "7.6.6",
68-
"@storybook/nextjs": "7.6.6",
69-
"@storybook/react": "7.6.6",
70-
"@storybook/test": "8.0.0",
67+
"@storybook/addon-essentials": "8.1.10",
68+
"@storybook/addon-interactions": "8.1.10",
69+
"@storybook/addon-links": "8.1.10",
70+
"@storybook/nextjs": "8.1.10",
71+
"@storybook/react": "8.1.10",
72+
"@storybook/test": "8.1.10",
7173
"@svgr/webpack": "^8.1.0",
7274
"@types/decompress": "^4.2.7",
7375
"@types/hast": "^3.0.0",
7476
"@types/node": "^20.4.2",
7577
"@types/react": "18.2.57",
7678
"@types/react-dom": "18.2.19",
77-
"chromatic": "^10.5.0",
79+
"chromatic": "10.9.6",
7880
"decompress": "^4.2.1",
7981
"eslint": "^8.45.0",
8082
"eslint-config-next": "^14.2.2",
8183
"eslint-config-prettier": "^9.0.0",
8284
"eslint-plugin-simple-import-sort": "^10.0.0",
83-
"eslint-plugin-storybook": "^0.6.15",
85+
"eslint-plugin-storybook": "0.8.0",
8486
"image-size": "^1.0.2",
8587
"mdast-util-toc": "^7.0.0",
8688
"minimist": "^1.2.8",
8789
"plaiceholder": "^3.0.0",
8890
"polished": "^4.2.2",
8991
"raw-loader": "^4.0.2",
90-
"storybook": "7.6.6",
91-
"storybook-react-i18next": "^2.0.9",
92+
"storybook": "8.1.10",
93+
"storybook-react-i18next": "3.1.1",
9294
"ts-node": "^10.9.1",
9395
"tsconfig-paths-webpack-plugin": "4.1.0",
9496
"typescript": "^5.4.2",

src/components/Alert/Alert.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const StyleVariants: Story = {
6060
},
6161
argTypes: {
6262
status: {
63-
options: STATUSES,
63+
options: [...STATUSES],
6464
control: {
6565
type: "radio",
6666
},

src/components/Buttons/ButtonTwoLines/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import type { IconType } from "react-icons/lib"
22
import { Icon, Stack, Text } from "@chakra-ui/react"
33

4-
import { Button, type ButtonProps } from "@/components/Buttons"
5-
import ButtonLink, {
6-
type ButtonLinkProps,
7-
} from "@/components/Buttons/ButtonLink"
4+
import Button, { type ButtonProps } from "../Button"
5+
import ButtonLink, { type ButtonLinkProps } from "../ButtonLink"
86

97
type CommonProps = {
108
icon: IconType | typeof Icon

src/components/Modal/Modal.stories.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,25 @@ import ModalComponent from "."
55
const meta = {
66
title: "Molecules/Overlay Content/Modal",
77
component: ModalComponent,
8-
} satisfies Meta<typeof ModalComponent>
9-
10-
export default meta
11-
12-
type Story = StoryObj<typeof meta>
13-
14-
export const Modal: Story = {
158
args: {
169
isOpen: true,
1710
title: "Modal Title",
1811
children:
1912
"This is the base component to be used in the modal window. Please change the text to preview final content for ethereum.org",
2013
actionButtonLabel: "Save",
14+
// Required prop, but not used in the current stories
15+
onClose: () => {},
2116
},
22-
}
17+
} satisfies Meta<typeof ModalComponent>
18+
19+
export default meta
20+
21+
type Story = StoryObj<typeof meta>
22+
23+
export const Modal: Story = {}
2324

2425
export const Full: Story = {
2526
args: {
26-
isOpen: true,
27-
title: "Modal Title",
28-
children:
29-
"This is the base component to be used in the modal window. Please change the text to preview final content for ethereum.org",
30-
actionButtonLabel: "Save",
3127
size: "full",
3228
},
3329
}

0 commit comments

Comments
 (0)