therufa / mdi-vue

Material design icons for vue.js
https://www.npmjs.com/package/mdi-vue
MIT License
88 stars 13 forks source link

setting color #62

Open DaveTorrey opened 3 years ago

DaveTorrey commented 3 years ago

I don't see any clear way to define things like colors or add styles to this? Is there a way to add a class prop to be able to further define how it looks?

DaveTorrey commented 3 years ago

nevermind, i see i can just wrap it and set a class style to that. would still be nice to be able to set it directly onto the component

innovaweb-dev commented 2 years ago

@DaveTorrey , Be patient or make a pull request You can also read #37

// example with TailwindCSS
<mdicon name="hamburger" class="text-white"/>
zenojunior commented 2 years ago

While they don't add this prop, you can use other approach.

<mdicon name="github" class="fill-gray-400" />    <!-- example with Tailwind --> 
<mdicon name="github" style="fill: #9ca3af;" />    <!-- example with inline CSS --> 
/* style.css  */

span[role="img"].mdi > svg {
  fill: inherit;
}