Class: ToggleElementButton

UI.Components. ToggleElementButton


new ToggleElementButton(properties)

Creates a new instance of ToggleElementButton.
Parameters:
Name Type Description
properties Object An object that contains the properties of the ToggleElementButton.
Properties
Name Type Argument Description
dataElement string <optional>
The dataElement of toggle button.
toggleElement string The dataElement of the element to toggle.
title string <optional>
The tooltip text to be displayed when hovering over the toggle button.
label string <optional>
The label of the button.
img string <optional>
The title of the button which appears in a tooltip.
style object <optional>
An object defining inline CSS styles for the button, where each key represents a CSS property and its corresponding value.
className string <optional>
String with CSS classes to be applied to the button, allowing additional styling and customization through external stylesheets.
Example
const toggleButton = new instance.UI.Components.ToggleElementButton({
  label: 'Toggle',
  title: 'Toggle the visibility of the element',
  img: 'icon-save',
  toggleElement: 'elementToToggle',
});

Extends

Methods


setStyle(style)

Sets the style of the Item (padding, border, background, etc.)
Parameters:
Name Type Description
style Object An object that can change the CSS style of the Item component.
Inherited From: