A set of minimalistic customizable material design SVG-icon components for React.
- Node 7.5.0 or newer (not tested on earlier versions)
- Typescript 2.1.5 or newer (not tested on earlier versions)
- Babel 6.2.2 or newer (not tested on earlier versions)
I recommend that you get to know React and Material-UI.
npm i material-ui-customizable-icons --save
Once installed, just import and use the component:
import React from 'react';
import Active from 'material-ui-customizable-icons/Active';
const className = 'custom-icon';
const viewBox = '0 0 48 48';
const transform = 'scale(2)';
const style = {
width: '48px',
height: '48px',
};
const pallet = {
circle: 'rgba(169, 169, 169, 1)',
tick: 'rgba(255, 255, 255, 1)',
};
const Example = () => (
<Active
className={className}
style={style}
transform={transform}
pallet={pallet}
/>
);
export default Example;
Props | Options | Default | Description |
---|---|---|---|
className | String | '' | Adds custom class to SVG container. |
style | Object | {} | Adds custom inline styles to SVG container. |
viewBox | String | '0 0 24 24' | Defines view-box attribute of SVG container. |
transform | String | '0 0 24 24' | The transform property applies a 2D or 3D transformation to an element. |
pallet | Object | {} | Component-specific colors pallet. |
- Submit an issue
- Fork the repository
- Create a dedicated branch (never ever work in
master
) - The first time, run command:
yarn
into the directory - Fix bugs or implement features
- Fix distribution type definitions to handle "import {...} from 'material-ui-customizable-icons'" imports
- Add tests
- Add examples directory
This project is licensed under the terms of the MIT license