Skip to content

Build your personal knowledge base with Trilium Notes

feat(note_type_switcher): use arrows next to dropdowns

Elian Doran71d8588091a1
diff --git a/apps/client/src/widgets/react/Badge.tsx b/apps/client/src/widgets/react/Badge.tsx
index dea4158ca9..b8aa9c2184 100644
--- a/apps/client/src/widgets/react/Badge.tsx
+++ b/apps/client/src/widgets/react/Badge.tsx
@@ -14,7 +14,7 @@ interface SimpleBadgeProps {
}
interface BadgeProps extends Pick<HTMLAttributes<HTMLDivElement>, "onClick" | "style"> {
- text?: string;
+ text?: ComponentChildren;
icon?: string;
className?: string;
tooltip?: string;
@@ -51,14 +51,18 @@ export function Badge({ icon, className, text, tooltip, href, ...containerProps
);
}
-export function BadgeWithDropdown({ children, tooltip, className, dropdownOptions, ...props }: BadgeProps & {
+export function BadgeWithDropdown({ text, children, tooltip, className, dropdownOptions, ...props }: BadgeProps & {
children: ComponentChildren,
dropdownOptions?: Partial<DropdownProps>
}) {
return (
<Dropdown
className={`dropdown-badge dropdown-${className}`}
- text={<Badge className={className} {...props} />}
+ text={<Badge
+ text={<>{text} <Icon icon="bx bx-chevron-down" /></>}
+ className={className}
+ {...props}
+ />}
noDropdownListStyle
noSelectButtonStyle
hideToggleArrow