@bigbinary/neeto-icons 1.21.0 → 1.21.1
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 +48 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,54 @@ Anywhere in your React file
|
|
|
64
64
|
<Clock color="#1e1e20" size={24} />
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
### React Native imports
|
|
68
|
+
|
|
69
|
+
Every category is available as a barrel:
|
|
70
|
+
|
|
71
|
+
```javascript
|
|
72
|
+
import { NeetoSite } from "@bigbinary/neeto-icons-rn/app-icons";
|
|
73
|
+
import { Keyboard } from "@bigbinary/neeto-icons-rn/elements";
|
|
74
|
+
import { Clock } from "@bigbinary/neeto-icons-rn/icons";
|
|
75
|
+
import { Neeto } from "@bigbinary/neeto-icons-rn/logos";
|
|
76
|
+
import { Windows } from "@bigbinary/neeto-icons-rn/misc";
|
|
77
|
+
import { Neeto as NeetoTypeface } from "@bigbinary/neeto-icons-rn/typeface-logos";
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Each icon can also be imported on its own, as a default export, so that the bundler only pulls in what is used:
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
import Clock from "@bigbinary/neeto-icons-rn/icons/Clock";
|
|
84
|
+
import Neeto from "@bigbinary/neeto-icons-rn/logos/Neeto";
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Every category is also reachable through a single namespaced entry point:
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
import { Icons, Logos, Misc } from "@bigbinary/neeto-icons-rn/namespaces";
|
|
91
|
+
|
|
92
|
+
<Icons.Clock size={24} />;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The props type is exported separately:
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import type { IconProps } from "@bigbinary/neeto-icons-rn/types";
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Metro configuration
|
|
102
|
+
|
|
103
|
+
These subpaths are declared through the `exports` field of the package, which Metro honours by default only from React
|
|
104
|
+
Native 0.79 onward. On earlier versions the field is ignored and the imports above fail to resolve, so enable it in
|
|
105
|
+
`metro.config.js`:
|
|
106
|
+
|
|
107
|
+
```javascript
|
|
108
|
+
module.exports = {
|
|
109
|
+
resolver: {
|
|
110
|
+
unstable_enablePackageExports: true,
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
```
|
|
114
|
+
|
|
67
115
|
### Product logos
|
|
68
116
|
|
|
69
117
|
```javascript
|