0

I'm using this page to create my custom SVG component. However, the image background is showing up but not the icon inside the image. The SVG component is the exact same as on the page. I tried inputting the object with these attributes:

<c:iconSVG svgpath="/resource/slds202/assets/icons/standard-sprite/svg/symbols.svg#user" category="standard" size="small" name="user" />

And these:

<c:iconSVG svgpath="/assets/icons/standard-sprite/svg/symbols.svg#user" category="standard" size="small" name="user" />

Still produces the same result, a blue box for an account sprite and a greenish box for user.

1

I tried the exact example from the link and it worked for me. Are you making sure the svgPath url is the correct one? Is your SLDS static resource named 'slds202'?

Also the attribute name is 'svgPath' not 'svgpath'---remember, the attributes are case-sensitive!

  • That was it! Seems The Welkin Suite has been editing my capitalization when I pull from salesforce. Thank you! – ChrisLuman Jul 1 '16 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.