React SVG component for emoji mood icons
npm i react-moodycons -D
import React from 'react';
import Icon from 'react-moodycons';
module.exports = React.createClass({
render: function() {
return (
<Icon name='grinning' />
);
}
});
-
name
- single word icon name (required) -
fill
- string, inherits from parent by default -
width
- number, defaults to 50 -
height
- number, defaults to 50
This module is fully accessible! Output looks like this:
<svg role="img" aria-labelledby="grinning" "...">
<title id="grinning">grinning icon</title>
<path d="..."></path>
</svg>
<3
MIT License