Class: module:react-aiot/components/Toolbar

module:react-aiot/components/Toolbar

Renders the toolbar with Toolbar buttons. If props.activeButton is set all other ToolbarButton`s are disabled expect the props.backButton - then the user clicks on the cancel button (props.backButton.label) and the onCancel callback of the ToolbarButton gets executed.

If the ToolbarButton has a valid onSave callback the toolbar has an additional save button (props.backButton.save) - then the user clicks on the save button and the callback gets executed.

Constructor

new module:react-aiot/components/Toolbar(props)

Parameters:
Name Type Description
props object Properties
Properties
Name Type Attributes Description
isToolbarActive boolean <optional>
If true the toolbar buttons are enabled
isToolbarBusy boolean <optional>
If true the toolbar is overlayed with a spinning loader
buttons object.<key, object> <optional>
The toolbar buttons (see ToolbarButton)
backButton object <optional>
The toolbar back button (see ToolbarButton)
Properties
Name Type Attributes Description
label React.Element | string <optional>
This label represents the cancel button
save React.Element | string <optional>
This label represents the save button
activeButton string <optional>
The active toolbar button (must match the same as the object key of the button)
Source:

Extends

  • React.Component