Skip to content

Commit eb97c1b

Browse files
refactor: bring online all existing stories
1 parent fb34b32 commit eb97c1b

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

.storybook/main.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@ import { propNames } from "@chakra-ui/react"
1515
* The primary recommendation is to upgrade to Yarn 3 if possible
1616
*/
1717

18-
/**
19-
* Temporary list of allowed stories during migration to NextJS
20-
*/
21-
const tempStoryList = ["../src/components/Buttons/**/*.stories.@(ts|tsx)"]
22-
2318
const config: StorybookConfig = {
24-
stories: tempStoryList,
19+
stories: ["../src/components/**/*.stories.{ts,tsx}"],
2520
addons: [
2621
"@storybook/addon-links",
2722
"@storybook/addon-essentials",

src/components/BannerNotification/BannerNotification.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default {
1818
* and content from `../../content/developers/tutorials/hello-world-smart-contract-fullstack/index.md`
1919
*/
2020
export const PostMergeBanner: StoryFn<typeof BannerNotification> = (args) => {
21-
const { t } = useTranslation()
21+
const { t } = useTranslation("page-upgrades")
2222

2323
return (
2424
<BannerNotification {...args}>

src/components/BaseStories/Heading.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const headingScale: Array<HeadingProps> = [
6868

6969
export const Heading: Story = {
7070
args: {
71-
children: <Translation id="page-index-title" />,
71+
children: <Translation id="page-index:page-index-title" />,
7272
},
7373
render: (args) => (
7474
<VStack w="full">
@@ -85,7 +85,7 @@ export const Heading: Story = {
8585
textAlign="end"
8686
size={obj.size}
8787
>
88-
{obj.size as string|| "xl"}
88+
{(obj.size as string) || "xl"}
8989
</HeadingComponent>
9090
<HeadingComponent flex="3" {...obj}>
9191
{args.children}

src/components/BaseStories/Text.stories.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ type Story = StoryObj<typeof meta>
3737

3838
const textSizes = components.Text.sizes
3939

40+
const SINGLE_TEXT_CHILD = <Translation id="page-index:page-index-title" />
41+
4042
export const Normal: Story = {
4143
args: {
42-
children: <Translation id="page-index-title" />,
44+
children: SINGLE_TEXT_CHILD,
4345
},
4446
render: (args) => {
4547
return (
@@ -65,7 +67,7 @@ export const Normal: Story = {
6567

6668
export const Bold: Story = {
6769
args: {
68-
children: <Translation id="page-index-title" />,
70+
children: SINGLE_TEXT_CHILD,
6971
fontWeight: "bold",
7072
},
7173
render: (args) => {
@@ -91,7 +93,7 @@ export const Bold: Story = {
9193
}
9294
export const Italic: Story = {
9395
args: {
94-
children: <Translation id="page-index-title" />,
96+
children: SINGLE_TEXT_CHILD,
9597
fontStyle: "italic",
9698
},
9799
render: (args) => {
@@ -118,7 +120,7 @@ export const Italic: Story = {
118120

119121
export const Link: StoryObj<typeof ChakraLink> = {
120122
args: {
121-
children: <Translation id="page-index-title" />,
123+
children: SINGLE_TEXT_CHILD,
122124
},
123125
render: (args) => {
124126
return (

src/components/Hero/HubHero/HubHero.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ import learnHubHeroImg from "../../../../public/heroes/learn-hub-hero.png"
3030

3131
export const HubHero: StoryObj<typeof meta> = {
3232
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",
3636
heroImg: learnHubHeroImg,
3737
},
3838

@@ -42,7 +42,7 @@ export const HubHero: StoryObj<typeof meta> = {
4242

4343
const buttons: CommonHeroProps["buttons"] = [
4444
{
45-
content: t("hero-button-lets-get-started"),
45+
content: t("page-learn:hero-button-lets-get-started"),
4646
toId: "what-is-crypto-ethereum",
4747
matomo: {
4848
eventCategory: "learn hub hero buttons",

0 commit comments

Comments
 (0)