Skip to content

apellerano-pw/ember-class-list

 
 

Repository files navigation

ember-class-list

Concatenate really long dynamic class lists without worrying about whitespace.

Without ember-class-list

<div class="Btn
  {{if this.loaded "active"}}
  {{this.theme}}
">
  Update Photo
</div>

output:

<div class="Btn
  
  dark
">
  Update Photo
</div>

With ember-class-list

<div class={{class-list
  "Btn"
  {{if this.loaded "active"}}
  {{this.theme}}
>
  Update Photo
</div>

output:

<div class="Btn dark">
  Update Photo
</div>

Compatibility

  • Ember.js v3.4 or above
  • Ember CLI v3.4 or above
  • Node.js v10 or above

Installation

ember install ember-class-list

Usage

[Longer description of how to use the addon in apps.]

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

About

Concatenate class lists without worrying about whitespace

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 83.0%
  • HTML 16.4%
  • Handlebars 0.6%