Interface representing an option for an IScaffold2 component.

interface IScaffold2Option<T = Payload> {
    icon?: any;
    iconColor?: string;
    id: string;
    isDisabled?: (payload: T) => boolean | Promise<boolean>;
    isVisible?: (payload: T) => boolean | Promise<boolean>;
    label?: any;
    lifted?: boolean;
    options?: IScaffold2Option<T>[];
    pin?: boolean;
    sx?: any;
    tabs?: IScaffold2Tab<T>[];
}

Type Parameters

  • T = Payload

    The type of the payload used by the option.

Properties

icon?: any
iconColor?: string
id: string
isDisabled?: (payload: T) => boolean | Promise<boolean>

Checks if a payload is disabled.

Type declaration

    • (payload: T): boolean | Promise<boolean>
    • Parameters

      • payload: T

        The payload to check.

      Returns boolean | Promise<boolean>

      • True if the payload is disabled, false otherwise.
isVisible?: (payload: T) => boolean | Promise<boolean>

Determines the visibility of a given payload.

Type declaration

    • (payload: T): boolean | Promise<boolean>
    • Parameters

      • payload: T

        The payload to check visibility for.

      Returns boolean | Promise<boolean>

      • The visibility status. Returns a boolean if synchronous, otherwise returns a Promise.
label?: any
lifted?: boolean
options?: IScaffold2Option<T>[]

Represents an array of options for a variable.

The type of the options.

pin?: boolean
sx?: any
tabs?: IScaffold2Tab<T>[]

Represents an array of IScaffold2Tab objects.

The type of the IScaffold2Tab object.