Skip to main content

Icons

Installation

$ yarn add @rexlabs/icons

Usage

import Icons, {
createIcons,
useIconArgs,
makeIconComponent
} from '@rexlabs/dialog';

Irregularities

This package exports icon components created from our SVG's that will choose the SVG to show based on a size prop that is passed to the components. The idea is that in our other components can decide what size icon they want to use internally (based on their own size, or otherwise) and we will have a consistent (and better) dev experience when it comes to using icons.

The makeIconComponent function will also add the placeholder icon as a default for each size that isn't supplied, and throw a console warning to let the developer know that we don't currently have an icon in the desired size yet.

Copyright (c) 2021 Rex Software All Rights Reserved.