icons 2.0.0
Install from the command line:
Learn more about npm packages
$ npm install @dhi/icons@2.0.0
Install via package.json:
"@dhi/icons": "2.0.0"
About this version
This package provides icons primarily made by the UI/UX department, as we are usually working with water-related and map-based apps. We recommend primarily using the generic icons provided by @material-ui/icons
. The icons here are either specialized or generic icons standardised by UI/UX.
This package uses TypeScript and Yarn.
We are aiming for making it as easy as possible for more icons to be added. However, the icons need to fulfill some minimum requirements:
- [x] The icons are generic and close enough to the DHI CVI and is likely to find use in multiple projects.
- [x] The icons need to be reviewed by at least one of the maintainers.
Look up the repository guidelines for a more technical explanation.
Generating a Personal Access token with GitHub - More info
- Visit Github.com → Your Profile (top right) → Settings.
- Develop settings (bottom of sidebar)
- Personal access tokens
- "Generate new token"
- Note:
GitHub Packages
- Tick:
repo, write:packages, read:packages, delete:packages, admin:repo_hook
- "Generate token"
- Click clipboard icon to copy token
- Open
C:\users\<username>\.npmrc
or create this file here if doesn't exist. - Paste within it, replacing
<AUTH_TOKEN>
with the token you copied moments ago.
@dhi:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<AUTH_TOKEN>
(this file can also be created in project-scope via .npmrc
in root, but it is not advised as it links to your personal access token.)
- Now you may install DHI packages from GitHub Packages!
Install the package with yarn
or npm
.
// with npm
npm install @dhi/icons
// with yarn
yarn add @dhi/icons
To use the icons, import them with the following syntax:
import Edit from "@dhi/icons/Edit;
// or
import { Edit } from "@dhi/icons";
// then use in JSX
<Edit color="#00A4EC" width={40} height={40}/>
For all props/attributes that can be added to icons see here
These will be added to the upper <svg>
element - elements such as <path>
within it cannot be modified.
If you would like to contribute to our project, please read the repository guidelines.