UNPKG

1.25 kBMarkdownView Raw
1# @Coorpacademy/nova-icons
2
3Components bank (react and react-native) based on Nova SVG icons (through [Iconjar](https://geticonjar.com) files)
4
5## Adding an icon
6
7- Open the Iconjar collection that's in the `third-party` folder or add a new one
8- Drag and drop your SVG file into a collection (be careful of having a SVG without any custom color)
9- Export the new updated iconjar collection
10- Add the the brand new svg icon's path into `icons.js` file that's in root project
11- Generate the component using `yarn prepare`
12
13
14## Usage
15
16```jsx
17import React from 'react';
18import { NovaCompositionCoorpacademyCog } from '@coorpacademy/nova-icons';
19
20const MyComponent = () => (
21 <NovaCompositionCoorpacademyCog width={32} height={32} color="#123456" />
22);
23
24export default MyComponent;
25```
26
27**Note**: React-Native component will automatically be resolved as [Metro](https://github.com/facebook/metro) supports `.native.js` extension.
28
29## Props
30
31You can use the props supported by [svg](https://developer.mozilla.org/docs/Web/SVG/Attribute) and [react-native-svg](https://github.com/react-native-community/react-native-svg) `<SVG />` component with camel case format (ie: strokeColor).
32
33## Contributing
34
35Please, run `yarn test` before submitting a pull request.