MCPcopy Create free account
hub / github.com/dailydotdev/apps / LevelRow

Function LevelRow

packages/shared/src/features/posts/PostOptionsSheet.tsx:25–60  ·  view source on GitHub ↗
({
  icon,
  label,
  meta,
  onOpen,
}: {
  icon: ReactElement;
  label: string;
  meta?: string;
  onOpen: () => void;
})

Source from the content-addressed store, hash-verified

23);
24
25const 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
62const destructive = (option: MenuItemProps): MenuItemProps =>
63 option.id === 'delete'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected