2017-12-15 21:39:18 +00:00
|
|
|
import { helper } from '@ember/component/helper';
|
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]) {
|
|
|
|
return updateType.replace(/\//g, '-').dasherize();
|
|
|
|
}
|
|
|
|
|
2017-12-15 21:39:18 +00:00
|
|
|
export default helper(cssClass);
|