0.0.2 • Published 2 years ago

@triptyk/tpk-ember-checkbox v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

tpk-ember-checkbox

This addon will give you a simple checkbox alternative in TailwindCSS

Compatibility

  • Ember.js v3.20 or above
  • Ember CLI v3.20 or above
  • Node.js v12 or above
  • You need tailwind v2 or above to use this simple checkbox

Installation

ember install @triptyk/tpk-ember-checkbox

OR

pnpm add -D @triptyk/tpk-ember-checkbox

Usage

Integration example

Template .hbs

<Ui::Checkbox
  @label="RGPD ?"
  @checked={{this.checked}}
  @updateValue={{this.setValue}}
  @value={{this.value}}
  @name="rgpd"
  @imageUrl='/assets/icons/check.svg'
  @containerStyle=""
  @checkboxStyle=""
  @labelStyle=""
/>

Controller .ts/.js

@tracked value = '';

@tracked checked: boolean = false;
value: string = 'rgpd';

@action
setChecked(checked: boolean) {
  this.checked = checked;
}

Contributing

See the Contributing guide for details. You can also contact info@triptyk for more informations on how contributing on this project.

License

This project is licensed under the MIT License.