import React from 'react'; import type { Meta, StoryObj } from '@storybook/react'; import { LocationSvg, NextSVG } from '../../icons'; import Dropdown from './Dropdown'; import Button from '../Button/Button'; const meta: Meta = { title: '@quickblox-react-ui-kit/Presentation/ui-components/Dropdown', component: Dropdown, tags: ['autodocs'], parameters: { layout: 'centered', }, args: { disabled: false, options: [ { value: '', label: '', leftIcon: undefined, rightIcon: undefined }, ], className: '', }, argTypes: { children: { control: false, table: { defaultValue: { summary: undefined, }, type: { summary: 'ReactElement | string | number' }, }, description: 'Primary content', }, placement: { table: { defaultValue: { summary: 'bottomRight', }, type: { summary: 'topRight | bottomRight | left' }, }, description: 'The property that will determine where the Dropdown will appear', }, className: { table: { type: { summary: 'string' }, }, description: 'Additional classes', }, onSelect: { table: { type: { summary: 'function' }, }, description: 'Dropdown option selection function', }, disabled: { table: { defaultValue: { summary: 'false', }, type: { summary: 'boolean' }, }, description: 'Active', }, options: { table: { defaultValue: { summary: 'array', detail: '[{ value: "", label: "" }]', }, type: { summary: 'object', detail: '\n{\n value: string; \n label: string; \n leftIcon?: ReactElement; \n rightIcon?: ReactElement; \n} ', }, }, description: 'A set of options that can be passed to the dropdown', }, }, }; export default meta; type StoryDefault = StoryObj; export const DropdownDefault: StoryDefault = { args: { children: , disabled: false, options: [ { value: 'Text 1', label: 'Text 1', }, { value: 'Text 2', label: 'Text 2', }, { value: 'Text 3', label: 'Text 3', }, ], }, }; export const DropdownRightIcon = { args: { children: , disable: false, options: [ { value: 'Text 1', label: 'Text 1', rightIcon: , }, { value: 'Text 2', label: 'Text 2', rightIcon: , }, { value: 'Text 3', label: 'Text 3', rightIcon: , }, ], }, }; export const DropdownLeftIcon = { args: { children: , disable: false, options: [ { value: 'Text 1', label: 'Text 1', leftIcon: , }, { value: 'Text 2', label: 'Text 2', leftIcon: , }, { value: 'Text 3', label: 'Text 3', leftIcon: , }, ], }, };