@dnanpm/icons 2.0.0-alpha4 → 2.0.0-alpha5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1 +1,40 @@
1
- TBD
1
+ DNA Icons repository provides the set of icons used in various DNA projects. Icons are fetched directly from Figma, processed and published to NPM.
2
+
3
+ ## Installation
4
+
5
+ 1. Run install command in repository where DNA Icons should be added
6
+ ```shell
7
+ npm install @dnanpm/icons
8
+ ```
9
+
10
+ ## Usage example
11
+
12
+ ### React component
13
+
14
+ ```js
15
+ import { Warning } from '@dnanpm/icons';
16
+ import { Icon } from '@dnanpm/styleguide';
17
+
18
+ interface Props {
19
+ myProp?: string;
20
+ }
21
+
22
+ const MyComponent = ({
23
+ myProp,
24
+ }: Props) => {
25
+ return (
26
+ <Icon icon={Warning} />
27
+ );
28
+ };
29
+
30
+ export default MyComponent;
31
+ ```
32
+
33
+ ### SVG Sprite
34
+
35
+ ```js
36
+ import sprite from '@dnanpm/icons/sprite';
37
+
38
+ // Will log spritesheet as string
39
+ console.log(sprite);
40
+ ```