2017-12-15 21:39:18 +00:00
|
|
|
import { helper } from '@ember/component/helper';
|
2017-10-03 17:54:22 +00:00
|
|
|
import { inlineSvg } from 'ember-inline-svg/helpers/inline-svg';
|
|
|
|
|
|
|
|
// Generated at compile-time by ember-inline-svg
|
|
|
|
import SVGs from '../svgs';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Icon Helper
|
|
|
|
*
|
|
|
|
* Usage: {{x-icon name}}
|
|
|
|
*
|
|
|
|
* Renders an inline svg element by looking it up at `/public/images/icons/${name}.svg`
|
|
|
|
*/
|
|
|
|
export function xIcon(params, options) {
|
|
|
|
const name = params[0];
|
|
|
|
const classes = [options.class, 'icon', `icon-is-${name}`].compact().join(' ');
|
|
|
|
|
|
|
|
return inlineSvg(SVGs, name, { class: classes });
|
|
|
|
}
|
|
|
|
|
2017-12-15 21:39:18 +00:00
|
|
|
export default helper(xIcon);
|