-
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.
Merge pull request #286 from invariant-labs/staging
Update Prod
- Loading branch information
Showing
28 changed files
with
458 additions
and
341 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
20 changes: 20 additions & 0 deletions
20
src/components/Header/HeaderButton/ChangeWalletButton.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,20 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import ChangeWalletButton from './ChangeWalletButton' | ||
import { fn } from '@storybook/test' | ||
|
||
const meta = { | ||
title: 'Buttons/ChangeWalletButton', | ||
component: ChangeWalletButton | ||
} satisfies Meta<typeof ChangeWalletButton> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Primary: Story = { | ||
args: { | ||
name: 'Change Wallet', | ||
onConnect: fn(), | ||
connected: false, | ||
onDisconnect: fn() | ||
} | ||
} |
85 changes: 0 additions & 85 deletions
85
src/components/Header/HeaderButton/HeaderButton.stories.tsx
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
src/components/Header/HeaderButton/SelectChainButton.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,27 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import SelectChainButton from './SelectChainButton' | ||
import { fn } from '@storybook/test' | ||
import { Chain } from '@store/consts/types' | ||
|
||
const meta = { | ||
title: 'Buttons/SelectChainButton', | ||
component: SelectChainButton | ||
} satisfies Meta<typeof SelectChainButton> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Primary: Story = { | ||
args: { | ||
activeChain: { | ||
name: Chain.AlephZero, | ||
address: 'https://azero.invariant.app/swap' | ||
}, | ||
chains: [ | ||
{ name: Chain.AlephZero, address: 'https://azero.invariant.app/swap' }, | ||
{ name: Chain.Eclipse, address: 'https://eclipse.invariant.app/swap' } | ||
], | ||
onSelect: fn(), | ||
disabled: false | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/components/Header/HeaderButton/SelectNetworkButton.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,21 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import SelectNetworkButton from './SelectNetworkButton' | ||
import { Network } from '@invariant-labs/a0-sdk' | ||
import { RPC } from '@store/consts/static' | ||
import { action } from '@storybook/addon-actions' | ||
|
||
const meta = { | ||
title: 'Buttons/SelectNetworkButton', | ||
component: SelectNetworkButton | ||
} satisfies Meta<typeof SelectNetworkButton> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Primary: Story = { | ||
args: { | ||
name: Network.Testnet, | ||
networks: [{ networkType: Network.Testnet, rpc: RPC.TEST }], | ||
onSelect: (networkType, rpc) => action('chosen: ' + networkType + ' ' + rpc)() | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/components/Header/HeaderButton/SelectRPCButton.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,27 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import SelectRPCButton from './SelectRPCButton' | ||
import { Network } from '@invariant-labs/a0-sdk' | ||
import { RPC } from '@store/consts/static' | ||
import { action } from '@storybook/addon-actions' | ||
|
||
const meta = { | ||
title: 'Buttons/SelectRPCButton', | ||
component: SelectRPCButton | ||
} satisfies Meta<typeof SelectRPCButton> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Primary: Story = { | ||
args: { | ||
rpc: RPC.TEST, | ||
networks: [ | ||
{ | ||
networkType: Network.Testnet, | ||
rpc: RPC.TEST, | ||
rpcName: 'Testnet' | ||
} | ||
], | ||
onSelect: (networkType, rpc) => action('chosen: ' + networkType + ' ' + rpc)() | ||
} | ||
} |
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
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
Oops, something went wrong.