@bearei/react-icon
TypeScript icon, indicating that this package has built-in type declarations

0.0.15 • Public • Published

react-icon

Base icon components that support React and React native

Installation

yarn add @bearei/react-icon --save

Parameters

Name Type Required Description
size small medium large Icon size
width string number Icon width
height string number Icon height
fill string Icon fill color
content ReactNode Icon content
renderMain (props: IconMainProps) => ReactNode Render the icon main
renderContainer (props: IconContainerProps) => ReactNode Render the icon container

Use

import React from 'React';
import ReactDOM from 'react-dom';
import Icon from '@bearei/react-icon';

const icon = (
  <Icon
    renderMain={() => <i>{'icon'}</i>}
    renderContainer={({ id, children }) => (
      <div data-id={id} tabIndex={1}>
        {children}
      </div>
    )}
  />
);

ReactDOM.render(icon, container);

Package Sidebar

Install

npm i @bearei/react-icon

Weekly Downloads

0

Version

0.0.15

License

MIT

Unpacked Size

26.3 kB

Total Files

11

Last publish

Collaborators

  • bear_ei