Interface IFilePickerButton

Interface to define buttons of the FilePicker component The buttons are based on the Dialog buttons but the callback gets the array of selected nodes

interface IFilePickerButton {
    callback: ((nodes: Node[]) => void);
    disabled?: boolean;
    icon?: string;
    label: string;
    type?:
        | "primary"
        | "secondary"
        | "error"
        | "warning"
        | "success";
}

Hierarchy

Properties

callback: ((nodes: Node[]) => void)

Callback on button click

Type declaration

    • (nodes): void
    • Parameters

      • nodes: Node[]

        Array of @nextcloud/files Nodes that were selected

      Returns void

disabled?: boolean

Disabled state of the button

false
icon?: string

Optional Icon for the button Should be a SVG image as raw string

label: string

Label of the button

type?:
    | "primary"
    | "secondary"
    | "error"
    | "warning"
    | "success"

Button type