@holdr-ui/icons
v3.3.8
Published
<img src="https://d174jt5gj6yzzg.cloudfront.net/wQ8Sqi_E.png" style="object-fit: cover" alt="logo" width="300"/>
Downloads
482
Readme
Holdr UI Icons
Includes the icons used for developing all Holdr-related React applications, which utilize ES6 import. All icons used in this package are SVG icons.
Installation
yarn add @holdr-ui/icons
# or
npm install @holdr-ui/icons --save
Example Usage
An example of usage
import { ArticleReadFill } from '@holdr-ui/icons'
function Example() {
return (
<span>
I enjoy reading books <ArticleReadFill/>
</span>
)
}
Styling and customization
The logo inherits the color of the parent by default and the size of the font is determined by the system's font size. You can customize this by wrapping the component in an element and specifying the styles you want to add on the parent.
import { ArticleReadFill } from '@holdr-ui/icons'
function StyledIcon() {
return (
// Here we are changing the color and size of the icon
<span style={{color: '#c4ffee', fontSize: '2em'}}>
<ArticleReadFill/>
</span>
)
}
Typescript?
This package works with typescript projects.
Why React SVG components instead of fonts?
SVG is supported by all major browsers.