1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/ui/components/component-library/picker-network/picker-network.stories.tsx
Dhruv 658ceb90d1
Fix-Migrate Picker-Network to TS (#20365)
* migrating PickerNetwork to TS

* deleting js file

* deleting js snapshot

* fixing e2e tests and updating snapshot

* updating snapshot

* Some small updates to docs and types

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-08-04 10:11:55 -07:00

62 lines
1.6 KiB
TypeScript

import React from 'react';
import { StoryFn, Meta } from '@storybook/react';
import {
Display,
FlexDirection,
} from '../../../helpers/constants/design-system';
import { Box } from '..';
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',
},
} as Meta<typeof PickerNetwork>;
export const DefaultStory = (args) => <PickerNetwork {...args} />;
export const Label: StoryFn<typeof PickerNetwork> = (args) => (
<Box display={Display.Flex} flexDirection={FlexDirection.Column} gap={2}>
<PickerNetwork {...args} label="Arbitrum One" />
<PickerNetwork {...args} label="Polygon Mainnet" />
<PickerNetwork {...args} label="Optimism" />
<PickerNetwork
{...args}
label="BNB Smart Chain (previously Binance Smart Chain Mainnet)"
style={{ maxWidth: '200px' }}
/>
</Box>
);
export const Src: StoryFn<typeof PickerNetwork> = (args) => (
<Box display={Display.Flex} flexDirection={FlexDirection.Column} gap={2}>
<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';