Type Alias TJSMenuItemData

TJSMenuItemData: {
    class?: Function;
    condition?: boolean | Function;
    icon?: string;
    image?: string;
    imageAlt?: string;
    label?: string;
    onPress?: ((data?: {
        event?: KeyboardEvent | PointerEvent;
        focusSource?: A11yFocusSource;
        item?: TJSMenuItemData;
    }) => any);
    props?: object;
    separator?: "hr";
}

Type declaration

  • Optionalclass?: Function

    A Svelte component class.

  • Optionalcondition?: boolean | Function

    If a boolean and false or a function that invoked returns a falsy value this item is not added.

  • Optionalicon?: string

    A string containing icon classes.

  • Optionalimage?: string

    An image icon path.

  • OptionalimageAlt?: string

    An image 'alt' text description.

  • Optionallabel?: string

    A text string that is passed through localization.

  • OptionalonPress?: ((data?: {
        event?: KeyboardEvent | PointerEvent;
        focusSource?: A11yFocusSource;
        item?: TJSMenuItemData;
    }) => any)

    A callback function to invoke; The object contains the item menu item data and an A11yFocusSource object to potentially pass to a new application.

  • Optionalprops?: object

    An object passed on as props for any Svelte component.

  • Optionalseparator?: "hr"

    A menu item separator; only 'hr' supported.