3.14.0 • Published 6 years ago
@adv-ui/fc-iconset v3.14.0
Fotocasa React Iconset
Repository with all the icons of Fotocasa.
Run the development environment
- Clone the repo
npm inpm start
Building the Icon set
- Add svg files into
srcfolder. - Run
npm run prepare. - For every
svgfile, you will have available a React Component insidelibfolder.
Install
- Install npm package:
npm i -S @schibstedspain/fotocasa-iconset - Import needed styles in your app:
@import "@schibstedspain/fotocasa-iconset/lib/index"- Import every icon where you need by name:
import ArrowDown from '@schibstedspain/fotocasa-iconset/lib/ArrowDown'
const MyComponent = (props) => {
return (
<ArrowDown color='primary' render='lazy' size='medium' />
)
}Usage
Every icon is wrapped with <AtomIcon>, further information about its usage could be found:
- In the API documentation component.
- In the UX Definition Component
Available props:
color: Determine color of the icon Besides the primary color types, you could use currentColor to inherit the color from the parent. (default: ATOM_ICON_COLORS.currentColor).
render: Determine the render type of the icon. 'eager': The icon will be server-side rendered (default) 'lazy': The icon will be loaded on client when visible.
size: Determine the size of the icon. (default: ATOM_ICON_SIZES.medium).