diff --git a/apps/client/src/widgets/dialogs/note_type_chooser.tsx b/apps/client/src/widgets/dialogs/note_type_chooser.tsx index 17d9b7919..50836c9ad 100644 --- a/apps/client/src/widgets/dialogs/note_type_chooser.tsx +++ b/apps/client/src/widgets/dialogs/note_type_chooser.tsx @@ -10,6 +10,7 @@ import note_types from "../../services/note_types"; import { MenuCommandItem, MenuItem } from "../../menus/context_menu"; import { TreeCommandNames } from "../../menus/tree_context_menu"; import { Suggestion } from "../../services/note_autocomplete"; +import Badge from "../react/Badge"; export interface ChooseNoteTypeResponse { success: boolean; @@ -88,7 +89,8 @@ function NoteTypeChooserDialogComponent({ callback }: NoteTypeChooserDialogProps {noteTypes.map((_item) => { - if (_item.title === "----") { + if (_item.title === "----") { + return; } const item = _item as MenuCommandItem; @@ -98,8 +100,10 @@ function NoteTypeChooserDialogComponent({ callback }: NoteTypeChooserDialogProps } else { return ; + icon={item.uiIcon}> + {item.title} + {item.badges && item.badges.map((badge) => )} + ; } })} diff --git a/apps/client/src/widgets/react/Badge.tsx b/apps/client/src/widgets/react/Badge.tsx new file mode 100644 index 000000000..49d4b879d --- /dev/null +++ b/apps/client/src/widgets/react/Badge.tsx @@ -0,0 +1,8 @@ +interface BadgeProps { + className?: string; + title: string; +} + +export default function Badge({ title, className }: BadgeProps) { + return {title} +} \ No newline at end of file diff --git a/apps/client/src/widgets/react/FormList.tsx b/apps/client/src/widgets/react/FormList.tsx index f5722f0d4..ea00d9962 100644 --- a/apps/client/src/widgets/react/FormList.tsx +++ b/apps/client/src/widgets/react/FormList.tsx @@ -22,16 +22,16 @@ export default function FormList({ children, onSelect }: FormListOpts) { } interface FormListItemOpts { - text: string; + children: ComponentChildren; icon?: string; value?: string; } -export function FormListItem({ text, icon, value }: FormListItemOpts) { +export function FormListItem({ children, icon, value }: FormListItemOpts) { return (   - {text} + {children} ); }