chore(badges/content): add separator

This commit is contained in:
Elian Doran 2026-02-15 13:21:29 +02:00
parent 1e5b294eb3
commit 43ebbfc321
No known key found for this signature in database
2 changed files with 10 additions and 1 deletions

View File

@ -73,6 +73,7 @@ const typeMappings: Record<ActiveContentInfo["type"], {
dropStart: true,
options: [
{ label: "Legacy", value: "" },
{ type: "separator" },
{ label: "Trilium (Auto)", value: "next" },
{ label: "Trilium (Light)", value: "next-light" },
{ label: "Trilium (Dark)", value: "next-dark" }

View File

@ -55,6 +55,10 @@ interface ComboBoxGroup {
items: ComboBoxItem[];
}
interface ComboBoxSeparator {
type: "separator"
}
export interface ComboBoxProperty {
type: "combobox",
label: string;
@ -64,7 +68,7 @@ export interface ComboBoxProperty {
* The default value is used when the label is not set.
*/
defaultValue?: string;
options: (ComboBoxItem | ComboBoxGroup)[];
options: (ComboBoxItem | ComboBoxSeparator | ComboBoxGroup)[];
dropStart?: boolean;
}
@ -176,6 +180,10 @@ function ComboBoxPropertyView({ note, property }: { note: FNote, property: Combo
</Fragment>
);
}
if ("type" in option) {
return <FormDropdownDivider key={index} />;
}
return renderItem(option);
})}