2022-11-10 01:31:51 +01:00
|
|
|
import React from 'react';
|
2023-08-04 19:11:55 +02:00
|
|
|
import { StoryFn, Meta } from '@storybook/react';
|
2022-11-10 01:31:51 +01:00
|
|
|
import {
|
2023-08-04 19:11:55 +02:00
|
|
|
Display,
|
|
|
|
FlexDirection,
|
2022-11-10 01:31:51 +01:00
|
|
|
} from '../../../helpers/constants/design-system';
|
|
|
|
|
2023-08-04 19:11:55 +02:00
|
|
|
import { Box } from '..';
|
2022-11-10 01:31:51 +01:00
|
|
|
import README from './README.mdx';
|
|
|
|
import { PickerNetwork } from './picker-network';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Components/ComponentLibrary/PickerNetwork',
|
|
|
|
component: PickerNetwork,
|
|
|
|
parameters: {
|
|
|
|
docs: {
|
|
|
|
page: README,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
argTypes: {
|
|
|
|
label: {
|
|
|
|
control: 'text',
|
|
|
|
},
|
|
|
|
src: {
|
|
|
|
control: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
args: {
|
|
|
|
label: 'Avalanche C-Chain',
|
|
|
|
src: './images/avax-token.png',
|
|
|
|
},
|
2023-08-04 19:11:55 +02:00
|
|
|
} as Meta<typeof PickerNetwork>;
|
2022-11-10 01:31:51 +01:00
|
|
|
|
|
|
|
export const DefaultStory = (args) => <PickerNetwork {...args} />;
|
|
|
|
|
2023-08-04 19:11:55 +02:00
|
|
|
export const Label: StoryFn<typeof PickerNetwork> = (args) => (
|
|
|
|
<Box display={Display.Flex} flexDirection={FlexDirection.Column} gap={2}>
|
2022-11-10 01:31:51 +01:00
|
|
|
<PickerNetwork {...args} label="Arbitrum One" />
|
|
|
|
<PickerNetwork {...args} label="Polygon Mainnet" />
|
|
|
|
<PickerNetwork {...args} label="Optimism" />
|
2023-04-28 19:20:55 +02:00
|
|
|
<PickerNetwork
|
|
|
|
{...args}
|
|
|
|
label="BNB Smart Chain (previously Binance Smart Chain Mainnet)"
|
|
|
|
style={{ maxWidth: '200px' }}
|
|
|
|
/>
|
2022-11-10 01:31:51 +01:00
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
|
2023-08-04 19:11:55 +02:00
|
|
|
export const Src: StoryFn<typeof PickerNetwork> = (args) => (
|
|
|
|
<Box display={Display.Flex} flexDirection={FlexDirection.Column} gap={2}>
|
2022-11-10 01:31:51 +01:00
|
|
|
<PickerNetwork {...args} label="Arbitrum One" src="./images/arbitrum.svg" />
|
|
|
|
<PickerNetwork
|
|
|
|
{...args}
|
|
|
|
label="Polygon Mainnet"
|
|
|
|
src="./images/matic-token.png"
|
|
|
|
/>
|
|
|
|
<PickerNetwork {...args} label="Optimism" src="./images/optimism.svg" />
|
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
|
|
|
|
DefaultStory.storyName = 'Default';
|