import React from 'react'; import { ComponentStory, ComponentMeta } from '@storybook/react'; import Dropdown from './Dropdown'; import { Icon } from '../Icon'; import color from '../../styles/colors'; import { Avatar } from '../Avatar'; const parentWrapper = { height: '1px', minHeight: '400px', }; export default { title: '5.Popup/Dropdown', component: Dropdown, argTypes: { onComplete: { action: 'completed' } }, decorators: [(storyFn) =>
{storyFn()}
], } as ComponentMeta; const Template: ComponentStory = (args) => (
); export const Default = Template.bind({}); Default.args = { options: [ { label: 'Api Key', id: 'Api Key', }, { label: 'Testnet', id: 'Testnet', }, { label: 'Mainent', id: 'Mainent', }, ], label: 'Server: ', icon: 'download', isDisabled: false, }; export const ControlledState = Template.bind({}); ControlledState.args = { options: [ { label: 'Api Key', id: 'Api Key', }, { label: 'Testnet', id: 'Testnet', }, { label: 'Mainent', id: 'Mainent', }, ], label: 'Server: ', icon: 'download', selectedState: 0, }; export const NonFixedLabel = Template.bind({}); NonFixedLabel.args = { options: [ { label: 'Api Key', id: 'Api Key', }, { label: 'Testnet', id: 'Testnet', }, { label: 'Mainent', id: 'Mainent', }, ], label: 'Server: ', isLabelFixed: false, icon: 'download', }; export const Iconless = Template.bind({}); Iconless.args = { options: [ { label: 'Api Key', id: 'Api Key', }, { label: 'Testnet', id: 'Testnet', }, { label: 'Mainent', id: 'Mainent', }, ], label: 'Server: ', }; export const DropdownWithPrefixItems = Template.bind({}); DropdownWithPrefixItems.args = { options: [ { label: 'Api Key', id: 'Api Key', prefix: ( ), }, { label: 'Testnet', id: 'Testnet', prefix: ( ), }, { label: 'Mainent', id: 'Mainent', prefix: ( ), }, ], }; export const LabelLess = Template.bind({}); LabelLess.args = { options: [ { label: 'Api Key', id: 'Api Key', prefix: , }, { label: 'Testnet', id: 'Testnet', prefix: , }, ], label: 'Server: ', isLabelVisible: false, width: 'fit-content', defaultOptionIndex: 0, };