forked from ethereum/ethereum-org-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Simulator/screens/ConnectWeb3): create stories for main component
- Loading branch information
1 parent
d8c3e2d
commit fa74d59
Showing
3 changed files
with
67 additions
and
2 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
59 changes: 59 additions & 0 deletions
59
src/components/Simulator/screens/ConnectWeb3/__stories__/ConnectWeb3.stories.tsx
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import type { Meta, StoryObj } from "@storybook/react/*" | ||
import { fn } from "@storybook/test" | ||
|
||
import { Phone } from "@/components/Simulator/Phone" | ||
import { Template } from "@/components/Simulator/Template" | ||
|
||
import { ConnectWeb3 as Component } from "../" | ||
|
||
const meta = { | ||
title: "Molecules / Display Content / Simulator / ConnectWeb3 Screen", | ||
component: Component, | ||
decorators: [ | ||
(Story) => ( | ||
<div className="mt-8"> | ||
<Template> | ||
<Phone> | ||
<Story /> | ||
</Phone> | ||
</Template> | ||
</div> | ||
), | ||
], | ||
args: { | ||
nav: { | ||
progressStepper: fn(), | ||
step: 0, | ||
openPath: fn(), | ||
regressStepper: fn(), | ||
totalSteps: 3, | ||
}, | ||
ctaLabel: "Visit NFT market", | ||
}, | ||
} satisfies Meta<typeof Component> | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof meta> | ||
|
||
export const Initial: Story = {} | ||
|
||
export const SliderNotConnected: Story = { | ||
args: { | ||
nav: { | ||
...meta.args.nav, | ||
step: 2, | ||
}, | ||
ctaLabel: "Connect to app", | ||
}, | ||
} | ||
|
||
export const SliderConnected: Story = { | ||
args: { | ||
nav: { | ||
...meta.args.nav, | ||
step: 3, | ||
}, | ||
ctaLabel: "Go to account", | ||
}, | ||
} |
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