ViewButtonProps
Props
The following table outlines the props for the ViewButtonProps:
| Name | Type | Default | Description |
|---|---|---|---|
| ariaLabel | string | - | Adds an accessible ARIA label to the button for screen readers and accessibility tools. Essential for keyboard navigation and voice command support. |
| className | string | - | Adds a custom CSS class name to the button element for custom styling. Enables fine-grained style control through external CSS. |
| color | - | Specifies the semantic color of the button for visual hierarchy and intent communication. Options: 'Primary', 'Secondary', 'Warning', 'Success', 'Error', 'Info'. | |
| currentView | string | - | The name or identifier of the currently active view type in the scheduler. Indicates which view option is selected in the view switcher. |
| disabled | boolean | - | When true, disables the button and prevents user interaction. Useful for conditional disabling based on state or permissions. |
| icon | ReactElement | - | An icon for the button, either as a CSS class name for icon fonts or as a React element. Enhances button visual clarity and user recognition. |
| items | - | An array of available view options presented in the view switcher dropdown. Each item represents a selectable view (Day, Week, Month, etc.). | |
| onClick | (e?: React.SyntheticEvent) => void | - | Click handler function executed when the button is clicked. Receives the click event as a parameter. |
| onSelect | (args: ButtonSelectEvent) => void | - | Callback handler triggered when the user selects a different view from the view switcher. Enables custom handling of view changes. |
| title | string | - | Adds a custom tooltip or title text displayed on button hover. Provides user guidance about the button's function. |
| variant | - | Specifies the visual style variant of the button for design flexibility. Options: 'Outlined', 'Filled', 'Standard' for different visual presentations. |