({
icon,
label,
meta,
onOpen,
}: {
icon: ReactElement;
label: string;
meta?: string;
onOpen: () => void;
})
| 23 | ); |
| 24 | |
| 25 | const LevelRow = ({ |
| 26 | icon, |
| 27 | label, |
| 28 | meta, |
| 29 | onOpen, |
| 30 | }: { |
| 31 | icon: ReactElement; |
| 32 | label: string; |
| 33 | meta?: string; |
| 34 | onOpen: () => void; |
| 35 | }): ReactElement => ( |
| 36 | <DropdownMenuItem |
| 37 | onSelect={(event: Event) => { |
| 38 | event.preventDefault(); |
| 39 | onOpen(); |
| 40 | }} |
| 41 | > |
| 42 | <button |
| 43 | type="button" |
| 44 | role="menuitem" |
| 45 | className="inline-flex flex-1 items-center gap-2" |
| 46 | > |
| 47 | {icon} |
| 48 | <span className="min-w-0 flex-1 text-left">{label}</span> |
| 49 | {meta && ( |
| 50 | <span className="min-w-0 max-w-[45%] truncate text-text-tertiary typo-footnote"> |
| 51 | {meta} |
| 52 | </span> |
| 53 | )} |
| 54 | <ArrowIcon |
| 55 | size={IconSize.Small} |
| 56 | className="rotate-90 text-text-tertiary" |
| 57 | /> |
| 58 | </button> |
| 59 | </DropdownMenuItem> |
| 60 | ); |
| 61 | |
| 62 | const destructive = (option: MenuItemProps): MenuItemProps => |
| 63 | option.id === 'delete' |
nothing calls this directly
no outgoing calls
no test coverage detected