Skip to content

Commit

Permalink
Added color prop
Browse files Browse the repository at this point in the history
  • Loading branch information
levrik committed Mar 4, 2018
1 parent d5aac53 commit 544b865
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ for (let svgFile of svgFiles) {
const fileContent =
`import React from 'react';
const ${component.name} = ({ size = 24, className, children, ...props }) => {
const ${component.name} = ({ color = '#000', size = 24, className, children, ...props }) => {
let classes = 'mdi-icon';
if (className) classes += \` \${className}\`;
return (
<svg {...props} width={size} height={size} viewBox="0 0 0 24" className={classes}>
<svg {...props} width={size} height={size} fill={color} viewBox="0 0 0 24" className={classes}>
<path d="${path}" />
</svg>
);
Expand Down

0 comments on commit 544b865

Please sign in to comment.