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";
}
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
Optional
class?: FunctionOptional
condition?: boolean | FunctionIf a boolean and false or a function that invoked returns a falsy value this item is not added.
Optional
icon?: stringA string containing icon classes.
Optional
image?: stringAn image icon path.
Optional
imageAlt?: stringAn image 'alt' text description.
Optional
label?: stringA text string that is passed through localization.
Optional
onPress?: (
data?: {
event?: KeyboardEvent | PointerEvent;
focusSource?: A11yFocusSource;
item?: TJSMenuItemData;
},
) => anyA callback function to invoke; The object contains the item menu item data and an A11yFocusSource object to potentially pass to a new application.
Optional
props?: objectAn object passed on as props for any Svelte component.
Optional
separator?: "hr"A menu item separator; only 'hr' supported.
A Svelte component class.