How to use terra-button-group - 3 common examples

To help you get started, we’ve selected a few terra-button-group examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cerner / terra-core / packages / terra-button-group / src / terra-dev-site / doc / example / ButtonGroupSingleSelect.jsx View on Github external
handleSelection(event, selectedKey) {
    if (ButtonGroup.Utils.shouldHandleSingleSelection(this.state.selectedKey, selectedKey)) {
      event.preventDefault();
      this.setState({ selectedKey: [selectedKey] });
    }
  }
github cerner / terra-core / packages / terra-button-group / src / terra-dev-site / doc / example / ButtonGroupIsBlock.jsx View on Github external
    this.setState(prevState => ({ selectedKeys: ButtonGroup.Utils.handleMultiSelectedKeys(prevState.selectedKeys, key) }));
  }
github cerner / terra-core / packages / terra-button-group / src / terra-dev-site / doc / example / ButtonGroupMultiSelect.jsx View on Github external
    this.setState(prevState => ({ selectedKeys: ButtonGroup.Utils.handleMultiSelectedKeys(prevState.selectedKeys, key) }));
  }

terra-button-group

The Terra Button Group component groups buttons and can maintain a toggle selection state.

Apache-2.0
Latest version published 7 months ago

Package Health Score

57 / 100
Full package analysis

Popular terra-button-group functions