import { useMemo } from 'react'; import type { DropdownProps } from './Dropdown'; import { Dropdown } from './Dropdown'; import { Icon } from './Icon'; export interface RadioDropdownItem { label: string; shortLabel?: string; value: T; } export interface RadioDropdownProps { value: T; onChange: (value: T) => void; items: RadioDropdownItem[]; children: DropdownProps['children']; } export function RadioDropdown({ value, items, onChange, children }: RadioDropdownProps) { const dropdownItems = useMemo( () => items.map(({ label, shortLabel, value: v }) => ({ label, shortLabel, onSelect: () => onChange(v), leftSlot: , })), [value, items], ); return {children}; }