@wellcometrust/wellcome-icons 0.1.1 → 1.0.0
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 +45 -2
- package/dist/components/Icon/Icon.js +1 -0
- package/dist/index.d.ts +5 -1626
- package/package.json +1 -1
- package/dist/components/Icon.js +0 -1
package/README.md
CHANGED
|
@@ -1,2 +1,45 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# Wellcome Icons
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
These icons can be used across Wellcome's digital products. Currently this repository includes
|
|
5
|
+
a single React component that accepts two props - the `name` of the icon to be used and an optional
|
|
6
|
+
`viewbox` prop that allows for custom viewboxes to be applied to the icons.
|
|
7
|
+
|
|
8
|
+
We don't provide any styling or wrapper elements for the SVGs - these should be implemented within
|
|
9
|
+
the repository consuming this library.
|
|
10
|
+
|
|
11
|
+
### Installation
|
|
12
|
+
|
|
13
|
+
```npm install @wellcometrust/wellcome-icons --save```
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Import components
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import { Icon, IconProps } from '@wellcometrust/wellcome-icons';
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Contributing to Wellcome Icons development
|
|
24
|
+
|
|
25
|
+
### Clone this repo
|
|
26
|
+
|
|
27
|
+
```git clone git@github.com:wellcometrust/wellcome-icons.git```
|
|
28
|
+
|
|
29
|
+
### Node version and NVM
|
|
30
|
+
|
|
31
|
+
This repo supports a specific version of Node.js which is specified in [.nvmrc](.nvmrc). It is strongly recommended that you install [NVM](http://nvm.sh/) on your local machine to easily manage multiple versions of Node.
|
|
32
|
+
|
|
33
|
+
Running `nvm use` from the command line will automatically pick up the version named in the `.nvmrc` file and set this as the node version for the current terminal window.
|
|
34
|
+
|
|
35
|
+
### Installation
|
|
36
|
+
|
|
37
|
+
```npm install```
|
|
38
|
+
|
|
39
|
+
### Build all files
|
|
40
|
+
|
|
41
|
+
```npm run build```
|
|
42
|
+
|
|
43
|
+
### Publishing for consumption
|
|
44
|
+
|
|
45
|
+
New releases are published to NPM. Please speak to a member of the project dev team about this, or consult our documentation in Notion around how to publish to NPM.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import t from"../iconMapping.js";const o=({name:o,viewBox:r})=>{if(!Object.prototype.hasOwnProperty.call(t,o))return null;const n=t[o];return e.createElement(n,{viewBox:r})};o.displayName="Icon";export{o as Icon,o as default};
|