Interface Label
interface Label {
condition?: boolean | () => boolean;
icon?: string;
imageAlt?: string;
label: string;
onPress?: (
data?: {
event?: PointerEvent | KeyboardEvent;
focusSource?: A11yFocusSource;
item?: Label;
},
) => OnPressResult
| Promise<OnPressResult>;
}
condition?: boolean | () => boolean;
icon?: string;
imageAlt?: string;
label: string;
onPress?: (
data?: {
event?: PointerEvent | KeyboardEvent;
focusSource?: A11yFocusSource;
item?: Label;
},
) => OnPressResult
| Promise<OnPressResult>;
}
Hierarchy
- TJSMenuData.Item.Common<Label>
- Label (View Summary)
Index
Properties
Properties
Optional
condition
condition?: boolean | () => boolean
If a boolean and false or a function that invoked returns a falsy value this item is not added.
Optional
icon
icon?: string
A string containing font icon classes or an image / svg URL path to load.
Optional
imageAlt
imageAlt?: string
An image 'alt' text description for image icons.
label
label: string
A text string that is passed through localization.
Optional
onPress
onPress?: (
data?: {
event?: PointerEvent | KeyboardEvent;
focusSource?: A11yFocusSource;
item?: Label;
},
) => OnPressResult
| Promise<OnPressResult>
data?: {
event?: PointerEvent | KeyboardEvent;
focusSource?: A11yFocusSource;
item?: Label;
},
) => OnPressResult
| Promise<OnPressResult>
A callback function to invoke; The data object contains the originating event, menu item data, and an A11yFocusSource object to potentially handle later in a continuation of user interaction.
To defer immediate application of the A11yFocusSource return true
indicating a focus continuation.
Defines a standard menu item with label & potentially an icon.