Skip to content

Commit

Permalink
Merge pull request #141 from shannonsans/winter-16
Browse files Browse the repository at this point in the history
Fix usage of class and containerClass attributes
  • Loading branch information
BrunoFonzi committed Feb 29, 2016
2 parents 219c8fa + 1fcdc60 commit 0dd6f1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions site/resources/lightning-svg-icon-component-helper/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,18 @@ export default (
var size = component.get("v.size");
var name = component.get("v.name");
var classname = component.get("v.class");
var containerclass = component.get("v.containerClass");
var category = component.get("v.category");
var containerClassName = [
prefix+"icon__container",
prefix+"icon-"+category+"-"+name,
classname
containerclass
].join(' ');
var iconClassName = prefix+"icon "+prefix+"icon--" + size;
component.set("v.containerClass", containerClassName);
var svgroot = document.createElementNS(svgns, "svg");
var iconClassName = prefix+"icon "+prefix+"icon--" + size+" "+classname;
svgroot.setAttribute("aria-hidden", "true");
svgroot.setAttribute("class", iconClassName);
svgroot.setAttribute("name", name);
Expand Down

0 comments on commit 0dd6f1a

Please sign in to comment.