Templarian / MaterialDesign-Web-Component

MDI Icon web component for use with @mdi/js
https://templarian.github.io/@mdi/web-component/
MIT License
5 stars 1 forks source link

mdi-icon Feature Parity with @mdi/react #1

Open Templarian opened 5 years ago

Templarian commented 5 years ago
Crissov commented 5 years ago

Just copying from https://github.com/Templarian/MaterialDesign-React for convenience:

Icon <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.

burawi commented 4 years ago

@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

burawi commented 4 years ago

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 ?

Templarian commented 4 years ago

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.

Templarian commented 4 years ago

@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

burawi commented 4 years ago

It's already published, here is the link: mdi-component