How to use the carbon-components/es/components/inline-loading/inline-loading.create function in carbon-components

To help you get started, we’ve selected a few carbon-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 carbon-design-system / carbon-website / src / components / ComponentExample / inline-loading-demo-button.js View on Github external
constructor(element) {
    super(element);
    this.manage(
      on(element, 'click', event => {
        this.toggle(event);
      })
    );
    const targetElem = element.ownerDocument.querySelector(
      this.options.selectorTarget
    );
    if (targetElem) {
      this.state = InlineLoading.states.ACTIVE;
      this.target = InlineLoading.create(targetElem).setState(this.state);
    }
  }