2017-12-15 21:39:18 +00:00
|
|
|
import { helper } from '@ember/component/helper';
|
2022-04-07 19:51:41 +00:00
|
|
|
import { dasherize } from '@ember/string';
|
2017-09-19 14:47:10 +00:00
|
|
|
/**
|
|
|
|
* 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]) {
|
2022-04-07 19:51:41 +00:00
|
|
|
return dasherize(updateType.replace(/\//g, '-'));
|
2017-09-19 14:47:10 +00:00
|
|
|
}
|
|
|
|
|
2017-12-15 21:39:18 +00:00
|
|
|
export default helper(cssClass);
|