How to use clever-components - 1 common examples

To help you get started, we’ve selected a few clever-components 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 Clever / components / src / TabbedTable / TabbedTable.jsx View on Github external
import "./TabbedTable.less";


export default class TabbedTable extends React.PureComponent {
  static cssClass = {
    TAB_BAR: "TabbedTable--TabBar",
    TITLE: "TabbedTable--Title",
    TABS: "TabbedTable--Tabs",
    TAB_NAME: "TabbedTable--TabName",
    SELECTED_TAB_NAME: "TabbedTable--SelectedTabName",
  };

  static propTypes = {
    children: PropTypes.arrayOf(PropTypes.oneOfType([
      MorePropTypes.instanceOfComponent(Tab),
      PropTypes.oneOf([null, false]), // allow for conditionally including tabs
    ])).isRequired,
    title: PropTypes.string,
  };

  constructor(props) {
    super(props);

    this.state = {
      selectedTabIndex: 0,
    };
  }

  _onSelect(e, tabIndex) {
    e.preventDefault();
    this.setState({selectedTabIndex: tabIndex});

clever-components

A library of helpful React components and less styles

Apache-2.0
Latest version published 2 months ago

Package Health Score

73 / 100
Full package analysis

Similar packages