1.1.4 • Published 4 years ago
coin-icon v1.1.4
coin-icon
Cryptocurrency icons set
install
npm i coin-iconGlossary
CoinIcon
Optimazed way to use icons, since the icon is loading through URL.
Gettting started
- Fist of all you need to define the path for storing icons files. For example -
images/svg; - Copy all svg icons from
svg(github repo) to your public folder'images/svg; - Set up
CoinIconProviderwith public folder path:
<CoinIconProvider folderPath="'images/svg">
<App />
</CoinIconProvider>- Import
CoinIconto your code:
import { CoinIcon } from 'coin-icon';
<CoinIcon code="btc" />;Details
- Icon's
widthandheigthare equal to1emby default. To change icon's size change thefont-sizeof parent or currenttag. - Contains all properties declared in
HTMLAttributes<HTMLDivElement>interface from@types/reactpackage and custom properties described below:
| Property | Type | Required | Description |
|---|---|---|---|
code | CoinIconCode | No | TypeScript literal type of icon code |
url | string | No | Image URL. For a case, when icon for a code is missing |
Add new icon
- Add new svg file into
svgfolder
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<title>new-coin</title>
...
</svg>Make sure that width and height property are removed.
- Add to
src/interfaces/index.tsfile:
export const CoinIconNameList = [
...
/* start */
'new-icon',
/* end */
...
];- Create Pull Request
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago