File tree Expand file tree Collapse file tree 7 files changed +659
-824
lines changed Expand file tree Collapse file tree 7 files changed +659
-824
lines changed Original file line number Diff line number Diff line change @@ -15,20 +15,14 @@ import { propNames } from "@chakra-ui/react"
15
15
* The primary recommendation is to upgrade to Yarn 3 if possible
16
16
*/
17
17
18
- /**
19
- * Temporary list of allowed stories during migration to NextJS
20
- */
21
- const tempStoryList = [ "../src/components/Buttons/**/*.stories.@(ts|tsx)" ]
22
-
23
18
const config : StorybookConfig = {
24
- stories : tempStoryList ,
19
+ stories : [ "../src/components/**/*.stories.{ts,tsx}" ] ,
25
20
addons : [
26
21
"@storybook/addon-links" ,
27
22
"@storybook/addon-essentials" ,
28
- "@storybook/addon-onboarding" ,
29
23
"@storybook/addon-interactions" ,
30
24
"@chakra-ui/storybook-addon" ,
31
- "storybook-react-i18next"
25
+ "storybook-react-i18next" ,
32
26
] ,
33
27
staticDirs : [ "../public" ] ,
34
28
framework : {
Original file line number Diff line number Diff line change 54
54
"devDependencies" : {
55
55
"@chakra-ui/storybook-addon" : " 5.1.0" ,
56
56
"@netlify/plugin-nextjs" : " ^4.41.3" ,
57
- "@storybook/addon-essentials" : " 7.5.3" ,
58
- "@storybook/addon-interactions" : " 7.5.3" ,
59
- "@storybook/addon-links" : " 7.5.3" ,
60
- "@storybook/addon-onboarding" : " 1.0.8" ,
61
- "@storybook/nextjs" : " 7.5.3" ,
62
- "@storybook/react" : " 7.5.3" ,
57
+ "@storybook/addon-essentials" : " 7.6.6" ,
58
+ "@storybook/addon-interactions" : " 7.6.6" ,
59
+ "@storybook/addon-links" : " 7.6.6" ,
60
+ "@storybook/nextjs" : " 7.6.6" ,
61
+ "@storybook/react" : " 7.6.6" ,
63
62
"@storybook/testing-library" : " 0.2.2" ,
64
63
"@svgr/webpack" : " ^8.1.0" ,
65
64
"@types/hast" : " ^3.0.0" ,
77
76
"minimist" : " ^1.2.8" ,
78
77
"polished" : " ^4.2.2" ,
79
78
"raw-loader" : " ^4.0.2" ,
80
- "storybook" : " 7.5.3 " ,
79
+ "storybook" : " 7.6.6 " ,
81
80
"storybook-react-i18next" : " ^2.0.9" ,
82
81
"ts-node" : " ^10.9.1" ,
83
82
"typescript" : " ^5.1.6" ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export default {
18
18
* and content from `../../content/developers/tutorials/hello-world-smart-contract-fullstack/index.md`
19
19
*/
20
20
export const PostMergeBanner : StoryFn < typeof BannerNotification > = ( args ) => {
21
- const { t } = useTranslation ( )
21
+ const { t } = useTranslation ( "page-upgrades" )
22
22
23
23
return (
24
24
< BannerNotification { ...args } >
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ const headingScale: Array<HeadingProps> = [
68
68
69
69
export const Heading : Story = {
70
70
args : {
71
- children : < Translation id = "page-index-title" /> ,
71
+ children : < Translation id = "page-index:page-index -title" /> ,
72
72
} ,
73
73
render : ( args ) => (
74
74
< VStack w = "full" >
@@ -85,7 +85,7 @@ export const Heading: Story = {
85
85
textAlign = "end"
86
86
size = { obj . size }
87
87
>
88
- { obj . size as string || "xl" }
88
+ { ( obj . size as string ) || "xl" }
89
89
</ HeadingComponent >
90
90
< HeadingComponent flex = "3" { ...obj } >
91
91
{ args . children }
Original file line number Diff line number Diff line change @@ -37,9 +37,11 @@ type Story = StoryObj<typeof meta>
37
37
38
38
const textSizes = components . Text . sizes
39
39
40
+ const SINGLE_TEXT_CHILD = < Translation id = "page-index:page-index-title" />
41
+
40
42
export const Normal : Story = {
41
43
args : {
42
- children : < Translation id = "page-index-title" /> ,
44
+ children : SINGLE_TEXT_CHILD ,
43
45
} ,
44
46
render : ( args ) => {
45
47
return (
@@ -65,7 +67,7 @@ export const Normal: Story = {
65
67
66
68
export const Bold : Story = {
67
69
args : {
68
- children : < Translation id = "page-index-title" /> ,
70
+ children : SINGLE_TEXT_CHILD ,
69
71
fontWeight : "bold" ,
70
72
} ,
71
73
render : ( args ) => {
@@ -91,7 +93,7 @@ export const Bold: Story = {
91
93
}
92
94
export const Italic : Story = {
93
95
args : {
94
- children : < Translation id = "page-index-title" /> ,
96
+ children : SINGLE_TEXT_CHILD ,
95
97
fontStyle : "italic" ,
96
98
} ,
97
99
render : ( args ) => {
@@ -118,7 +120,7 @@ export const Italic: Story = {
118
120
119
121
export const Link : StoryObj < typeof ChakraLink > = {
120
122
args : {
121
- children : < Translation id = "page-index-title" /> ,
123
+ children : SINGLE_TEXT_CHILD ,
122
124
} ,
123
125
render : ( args ) => {
124
126
return (
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ import learnHubHeroImg from "../../../../public/heroes/learn-hub-hero.png"
30
30
31
31
export const HubHero : StoryObj < typeof meta > = {
32
32
args : {
33
- title : "learn-hub" ,
34
- header : "hero-header" ,
35
- description : "hero-subtitle" ,
33
+ title : "common: learn-hub" ,
34
+ header : "page-learn: hero-header" ,
35
+ description : "page-learn: hero-subtitle" ,
36
36
heroImg : learnHubHeroImg ,
37
37
} ,
38
38
@@ -42,7 +42,7 @@ export const HubHero: StoryObj<typeof meta> = {
42
42
43
43
const buttons : CommonHeroProps [ "buttons" ] = [
44
44
{
45
- content : t ( "hero-button-lets-get-started" ) ,
45
+ content : t ( "page-learn: hero-button-lets-get-started" ) ,
46
46
toId : "what-is-crypto-ethereum" ,
47
47
matomo : {
48
48
eventCategory : "learn hub hero buttons" ,
You can’t perform that action at this time.
0 commit comments