@catalyst-elements/catalyst-lazy-properties-mixin

0.1.0 • Public • Published

catalyst-lazy-properties-mixin

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

API documentation

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

Installation

Install with npm:

npm install --save @catalyst-elements/catalyst-lazy-properties-mixin

Install with yarn:

yarn add @catalyst-elements/catalyst-lazy-properties-mixin

Please note that this package is not compatible with Bower.

Usage

As a Module (Recommend)

import catalystLazyPropertiesMixin from './node_modules/@catalyst-elements/catalyst-lazy-properties-mixin/catalyst-lazy-properties-mixin.js';

class MyLazyPropertiesElement extends catalystLazyPropertiesMixin(HTMLElement) {
  constructor() {
    super();
    // ...
  }

  // ...
}

As a Script

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

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

  // ...
</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-lazy-properties-mixin

Weekly Downloads

12

Version

0.1.0

License

BSD-3-Clause

Unpacked Size

9.65 kB

Total Files

6

Last publish

Collaborators

  • catalyst-elements