mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +01:00
feat(note_type_switcher): use arrows next to dropdowns
This commit is contained in:
@@ -14,7 +14,7 @@ interface SimpleBadgeProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface BadgeProps extends Pick<HTMLAttributes<HTMLDivElement>, "onClick" | "style"> {
|
interface BadgeProps extends Pick<HTMLAttributes<HTMLDivElement>, "onClick" | "style"> {
|
||||||
text?: string;
|
text?: ComponentChildren;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
tooltip?: 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,
|
children: ComponentChildren,
|
||||||
dropdownOptions?: Partial<DropdownProps>
|
dropdownOptions?: Partial<DropdownProps>
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
className={`dropdown-badge dropdown-${className}`}
|
className={`dropdown-badge dropdown-${className}`}
|
||||||
text={<Badge className={className} {...props} />}
|
text={<Badge
|
||||||
|
text={<>{text} <Icon icon="bx bx-chevron-down" /></>}
|
||||||
|
className={className}
|
||||||
|
{...props}
|
||||||
|
/>}
|
||||||
noDropdownListStyle
|
noDropdownListStyle
|
||||||
noSelectButtonStyle
|
noSelectButtonStyle
|
||||||
hideToggleArrow
|
hideToggleArrow
|
||||||
|
|||||||
Reference in New Issue
Block a user