import { Meta, StoryFn, StoryObj } from '@storybook/react'; import React, { useState } from 'react'; import { ChainSelector } from '.'; export default { args: {}, component: ChainSelector, title: 'Components/ChainSelector', } as Meta; const Template: StoryFn = (args) => { const [chainId, setChainId] = useState(args.selectedChainId); return ; }; const chainOptions = [ 1, 10, 1101, 11155111, 11155420, 137, 1442, 1729, 89346161, 420, 42161, 421613, 421614, 42170, 5, 8453, 80001, ]; export const Default: StoryObj = { args: { chainOptions, }, render: Template, }; export const Approving: StoryObj = { args: { approving: true, chainOptions, selectedChainId: 1, }, render: Template, }; export const WithLabel: StoryObj = { args: { chainOptions, disabled: false, label: 'Choose chain', labelColorToken: 'white100', labelTypographyToken: 'bodySmallMedium', selectedChainId: 1, }, render: Template, }; export const WithLabelTooltip: StoryObj = { args: { chainOptions, disabled: false, label: 'Choose chain', labelColorToken: 'white100', labelTypographyToken: 'bodySmallMedium', selectedChainId: 1, tooltip: 'Created with ❤️!', tooltipColorToken: 'white950', }, render: Template, }; export const Disabled: StoryObj = { args: { chainOptions, disabled: true, selectedChainId: 1, }, render: Template, };