@ottodesign/react-icons v1.0.4-alpha.1
@ottodesign/react-icons
This is not a "general purpose" icon library at the moment. It just contains the icons that we need without all the fancy sets like solid, outline, etc.
Installation
yarn add @ottodesign/react-icons
Peer dependencies:
yarn add @ottodesign/react-theming @emotion/react react react-dom prop-types
Usage
The icons are just react components. Use them just like any other component.
import {VisibilityIcon} from "@ottodesign/react-icons"
export const MyComponent = ()=>(<VisibilityIcon/>)
Props
Icons offer size and color props similar to button. By default size="medium"
and color="default"
.
Contributing
Adding new Icons
Icons can use the factory method createIcon
which accpets an SVG Element and returns a JSX element with styles for color, size applied etc.
You can optionally pass a function applyStyles
to the factory to override or provide additonal styling, in the case of two tone or multicolor icons for example. See waffle Icon for example.
Make sure you add the Icon to the barrel export and to the array used to render the stories. icons.tsx
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago