@catalyst-elements/catalyst-labelable-mixin

0.1.2 • Public • Published

catalyst-labelable-mixin

Travis David David npm (scoped) Bower not supported Polymer 2 not supported Polymer 3 support pending

API documentation

<catalyst-labelable-mixin> is a mixin that provides an element with toggle behavior.

Installation

Install with npm:

npm install --save @catalyst-elements/catalyst-labelable-mixin

Install with yarn:

yarn add @catalyst-elements/catalyst-labelable-mixin

Please note that this package is not compatible with Bower.

Usage

As a Module (Recommend)

import CatalystLabelableMixin from './node_modules/@catalyst-elements/catalyst-labelable-mixin/catalyst-labelable-mixin.js';

class MyLabelableElement extends CatalystLabelableMixin(HTMLElement) {
  constructor() {
    super();
    // ...
  }

  // ...
}

As a Script

<script src="node_modules/@catalyst-elements/catalyst-labelable-mixin/catalyst-labelable-mixin.es5.min.js"></script>
<script>
  var SuperClass = window.CatalystElements.CatalystLabelableMixin(HTMLElement);

  function MyLabelableElement() {
    SuperClass.call(this);
    // ...
  };
  MyLabelableElement.prototype = Object.create(SuperClass.prototype);
  MyLabelableElement.prototype.constructor = MyLabelableElement;

  // ...
</script>

Please note that this script has been transpiled to es5 and thus use of custom-elements-es5-adapter.js or an equivalent library is required. See es5 support on the Catalyst Elements wiki for details.

Contributions

Contributions are most welcome.

Please read our contribution guidelines.

Package Sidebar

Install

npm i @catalyst-elements/catalyst-labelable-mixin

Weekly Downloads

11

Version

0.1.2

License

BSD-3-Clause

Unpacked Size

13.3 kB

Total Files

6

Last publish

Collaborators

  • catalyst-elements