mirror of
https://github.com/zadam/trilium.git
synced 2026-02-20 12:44:25 +01:00
chore(badges/content): add separator
This commit is contained in:
parent
1e5b294eb3
commit
43ebbfc321
@ -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" }
|
||||
|
||||
@ -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);
|
||||
|
||||
})}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user