@kadconsulting/dry
Version:
KAD Reusable Component Library
62 lines • 1.69 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import DropdownSelect from './DropdownSelect';
export default {
title: 'Components/FormInputs/DropdownSelect',
component: DropdownSelect,
argTypes: {
value: {
control: 'text',
defaultValue: '',
},
options: {
control: 'array',
defaultValue: ['Option 1', 'Option 2', 'Option 3'],
},
label: {
control: 'text',
defaultValue: 'Dropdown Label',
},
isVisible: {
control: 'boolean',
defaultValue: true,
},
isLoading: {
control: 'boolean',
defaultValue: false,
},
width: {
control: 'number',
},
disabled: {
control: 'boolean',
defaultValue: false,
},
},
};
const Template = (args) => (_jsx(DropdownSelect, { ...args }));
export const Default = Template.bind({});
Default.args = {
label: 'Choose an Option',
options: [{ label: 'Option 1', value: 'Option 1' }, { label: 'Option 2', value: 'Option 2' }, { label: 'Option 3', value: 'Option 3' }],
};
export const WithCustomWidth = Template.bind({});
WithCustomWidth.args = {
...Default.args,
width: '300',
};
export const LoadingState = Template.bind({});
LoadingState.args = {
...Default.args,
isLoading: true,
};
export const DisabledState = Template.bind({});
DisabledState.args = {
...Default.args,
disabled: true,
};
export const HiddenDropdown = Template.bind({});
HiddenDropdown.args = {
...Default.args,
isVisible: false,
};
//# sourceMappingURL=DropdownSelect.stories.js.map