mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 17:05:43 +03:00
17 lines
422 B
JavaScript
17 lines
422 B
JavaScript
import { helper } from '@ember/component/helper';
|
|
|
|
/**
|
|
* CSS Class
|
|
*
|
|
* Usage: {{css-class updateType}}
|
|
*
|
|
* Outputs a css friendly class string from any human string.
|
|
* Differs from dasherize by handling slashes.
|
|
*/
|
|
export function cssClass([updateType]) {
|
|
/* eslint-disable-next-line ember/no-string-prototype-extensions */
|
|
return updateType.replace(/\//g, '-').dasherize();
|
|
}
|
|
|
|
export default helper(cssClass);
|