@wellcometrust/wellcome-icons
v1.0.9
Published
Icons for Wellcome digital products
Maintainers
Keywords
Readme
Wellcome Icons
Introduction
These icons can be used across Wellcome's digital products. Currently this repository includes
a single React component that accepts two props - the name of the icon to be used and an optional
viewbox prop that allows for custom viewboxes to be applied to the icons.
We don't provide any styling or wrapper elements for the SVGs - these should be implemented within the repository consuming this library.
Installation
npm install @wellcometrust/wellcome-icons --save
Import components
import { Icon, IconProps } from '@wellcometrust/wellcome-icons';
Contributing to Wellcome Icons development
Clone this repo
git clone [email protected]:wellcometrust/wellcome-icons.git
Node version and NVM
This repo supports a specific version of Node.js which is specified in .nvmrc. It is strongly recommended that you install NVM on your local machine to easily manage multiple versions of Node.
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.
Installation
npm install
Build all files
npm run build
Publishing for consumption
Once a pull request with the necessary changes is merged, the developer:
- Checks out a new branch, the name isn't particularly important, something appropriate such as
git checkout -b task/updates-versionis fine. - Ensure the dependencies are up-to-date, run
npm ci. - Set the package version using the npm cli:
npm version <major|minor|patch> -m "Released version %s: <brief_description>"Runs the following command to publish the new version of the package:
npm publish --access publicPush the branch and the tags to the Github repo:
git push -u origin <branch_name> --follow-tags- Create a pull request against
main, request a review from other developers - Once approved, merge the pull request into
main.
You can now npm install @wellcometrust/wellcome-icons@{version_number|latest} to use the new version in your project.
