import { Meta } from '@storybook/react'; import { ReactNode } from 'react'; import { Briefcase } from 'lucide-react'; import { init as initFeatureService } from '@/react/portainer/feature-flags/feature-flags.service'; import { Edition, FeatureId } from '@/react/portainer/feature-flags/enums'; import Docker from '@/assets/ico/vendor/docker.svg?c'; import { IconProps } from '@@/Icon'; import { BoxSelectorItem } from './BoxSelectorItem'; import { BoxSelectorOption } from './types'; const meta: Meta = { title: 'BoxSelector/Item', args: { selected: false, description: 'description', icon: Briefcase, label: 'label', }, }; export default meta; interface ExampleProps { selected?: boolean; description?: string; icon?: IconProps['icon']; label?: string; feature?: FeatureId; } function Template({ selected = false, description = 'description', icon, label = 'label', feature, }: ExampleProps) { const option: BoxSelectorOption = { description, icon, id: 'id', label, value: 1, feature, }; return (
{}} option={option} radioName="radio" isSelected={() => selected} />
); } export const Example = Template.bind({}); export function SelectedItem() { return