You need to sign in to do that
Don't have an account?
Florian.Gümbel
Get path of icon set
Hey there,
I built a react component that generates the lightning icon markup.
This coponent need the resource path of the icon set.
Actually I hardcoded the resource path into my application. But thats not best practive due this path changes from release to release.
My question is, if there is a posibility to receive the actual icon resource path from lightning.
Cheers
Flo
I built a react component that generates the lightning icon markup.
This coponent need the resource path of the icon set.
Actually I hardcoded the resource path into my application. But thats not best practive due this path changes from release to release.
My question is, if there is a posibility to receive the actual icon resource path from lightning.
Cheers
Flo
I myself faced this problem once ago and I don't think it's possible. However, to avoid hard maintenance of changing the code you could use the Lightning Design System as ZIP Static Resource and update the resource when needed or from a release to another.
You can download here:
https://www.lightningdesignsystem.com/downloads/ (http://https://www.lightningdesignsystem.com/downloads/)
You can also use a custom setting or metadate to change the path when needed but I would avoid this approach if possible.
Hope to have helped!
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.
It has just come to my attention that since Spring '17 we can use the global var $Asset in visualforce pages to access the lightning design system. So if you're using your React within a VF it would work for you as well.
https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_vf_asset_variable.htm (http://https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_vf_asset_variable.htm)