import { Meta } from '@storybook/react'; import { init as initFeatureService } from '@/portainer/feature-flags/feature-flags.service'; import { Edition, FeatureId } from '@/portainer/feature-flags/enums'; import { BoxSelectorItem } from './BoxSelectorItem'; import { BoxSelectorOption } from './types'; const meta: Meta = { title: 'BoxSelector/Item', args: { selected: false, description: 'description', icon: 'fa-rocket', label: 'label', }, }; export default meta; interface ExampleProps { selected?: boolean; description?: string; icon?: string; label?: string; feature?: FeatureId; } function Template({ selected, description = 'description', icon, label = 'label', feature, }: ExampleProps) { const option: BoxSelectorOption = { description, icon: `fa ${icon}`, id: 'id', label, value: 1, feature, }; return (
{}} option={option} radioName="radio" selectedValue={selected ? option.value : 0} />
); } export const Example = Template.bind({}); export function SelectedItem() { return