diff --git a/ui/app/helpers/all-icons.js b/ui/app/helpers/all-icons.js new file mode 100644 index 000000000..57227f773 --- /dev/null +++ b/ui/app/helpers/all-icons.js @@ -0,0 +1,18 @@ +import { helper } from '@ember/component/helper'; + +// Generated at compile-time by ember-inline-svg +import SVGs from '../svgs'; + +/** + * Icons array + * + * Usage: {{#each (all-icons) as |icon|}} + * + * Returns the array of all icon strings available to {{x-icon}}. This is a bit of a hack + * since the above SVGs import isn't available in the Storybook context. + */ +export function allIcons() { + return Object.keys(SVGs); +} + +export default helper(allIcons);