Trilium Frontend API
    Preparing search index...

    Interface ItemCreationButton<T>

    One way of creating an entry, rendered as a button at the foot of the card.

    onCreateItem decides what the entry is, and can open a dialog or a picker first. Returning nothing creates no entry.

    interface ItemCreationButton<T extends SortableItem> {
        disabled?: boolean;
        icon?: string;
        label: string;
        onCreateItem: (event?: MouseEvent) => T | Promise<T>;
    }

    Type Parameters

    Index
    disabled?: boolean

    Turns the button off, for a caller that cannot make an entry yet.

    icon?: string

    An icon class, bx prefix included.

    label: string
    onCreateItem: (event?: MouseEvent) => T | Promise<T>

    Answers with the entry to add, or with nothing where none was made.