/* eslint-disable react/jsx-key */ import React from 'react'; import { InstanceDecorator, storybookArgTypes, storybookExcludedControlParams, StoryMetaType, } from '@lg-tools/storybook-utils'; import { StoryObj } from '@storybook/react'; import { glyphs, Icon } from '@leafygreen-ui/icon'; import { InputOption } from '../InputOption'; import { InputOptionContent } from '.'; const _withInputOptionDecorator: InstanceDecorator< typeof InputOption & typeof InputOptionContent > = (Instance, ctx) => { const { args: { darkMode, highlighted, checked, disabled }, } = ctx || { args: {} }; return ( ); }; export default { title: 'Internal/InputOption/Content', component: InputOptionContent, parameters: { default: 'Basic', controls: { exclude: [...storybookExcludedControlParams], }, generate: { storyNames: ['Basic', 'Highlighted', 'Checked', 'Disabled'], combineArgs: { darkMode: [false, true], description: [undefined, 'Description'], preserveIconSpace: [false, true], leftGlyph: [undefined, ], rightGlyph: [undefined, ], }, excludeCombinations: [ { leftGlyph: undefined, rightGlyph: , }, { preserveIconSpace: false, leftGlyph: , }, ], decorator: _withInputOptionDecorator, }, }, args: { children: 'Some text', showWedge: true, }, argTypes: { disabled: { control: 'boolean', }, highlighted: { control: 'boolean', }, checked: { control: 'boolean', }, showWedge: { control: 'boolean', }, leftGlyph: { options: Object.keys(glyphs), control: { type: 'select' }, }, rightGlyph: { options: Object.keys(glyphs), control: { type: 'select' }, }, description: { control: { type: 'text' }, }, as: storybookArgTypes.as, }, } satisfies StoryMetaType; export const Basic = { render: () => <>, } satisfies StoryObj; export const Highlighted = { render: () => <>, parameters: { generate: { args: { rightGlyph: , highlighted: true, }, }, }, } satisfies StoryObj; export const Disabled = { render: () => <>, parameters: { generate: { args: { disabled: true, }, }, }, } satisfies StoryObj;