How to use ember-svg-jar - 2 common examples

To help you get started, we’ve selected a few ember-svg-jar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ivanvotti / ember-svg-jar / app / helpers / svg-jar.js View on Github external
import makeSVG from 'ember-svg-jar/utils/make-svg';

function getInlineAsset(assetId) {
  try {
    /* eslint-disable global-require */
    return require(`ember-svg-jar/inlined/${assetId}`).default;
  } catch (err) {
    return null;
  }
}

export function svgJar(assetId, svgAttrs) {
  return makeSVG(assetId, svgAttrs, getInlineAsset);
}

export default makeHelper(svgJar);
github ivanvotti / ember-svg-jar / app / helpers / svg-jar.js View on Github external
export function svgJar(assetId, svgAttrs) {
  return makeSVG(assetId, svgAttrs, getInlineAsset);
}

ember-svg-jar

Best way to use SVG images in Ember applications

MIT
Latest version published 3 months ago

Package Health Score

76 / 100
Full package analysis