Open Templarian opened 5 years ago
Just copying from https://github.com/Templarian/MaterialDesign-React for convenience:
<mdi-icon/>
Prop | PropTypes | Default | Details |
---|---|---|---|
path | string | required | SVG path data. Usually from @mdi/js |
size | number, string | null |
{size * 1.5}rem , 1em , 48px |
horizontal | bool | false |
Flip Horizontal |
vertical | bool | false |
Flip Vertical |
rotate | number | 0 |
degrees 0 to 360 |
color | string | null |
rgb() / rgba() / #000 |
spin | bool, number | false |
true = 2s , -2 counterclockwise, {spin}s |
Note: Additional props will be applied to the
<svg>
element.
@Templarian Hey Dude! I'm back. I improved the package I made to support all those feature. To be honest I'm not comfortable with TypeScript, however, I tried to work on this repo but I couldn't get it to work, so I returned to my package and Improved it. I think that a simple web component does not need to be written in TypeScript. It would be great if you give me feedback! The link to mdi-component
So was it helpful ? Will you consider to merge it with your work, so I wait you to publish it on webcomponents.org or should I publish my package to it ?
Always helpful to look at others code. Will try and spend some time this weekend to get the component updated and published to NPM. With that said you should definitely publish yours also. The first party components won't always be the most used (look at the mdi-react
component is way more popular than @mdi/react
).
We just released an update to @mdi/react
last week by the way with A11y support. Might want to look into adding those attributes also.
We're rolling out internal tooling right now that is taking a lot of my time, and these things kind of sit lower in my priority.
@burawi Let me know when it's published on NPM and I'll link it in the docs. Need to add a page for "Web Components". :thum
It's already published, here is the link: mdi-component
path
proptitle
propdescription
propsize
prophorizontal
propvertical
proprotate
propcolor
propspin
prop