Socket
Socket
Sign inDemoInstall

@bearei/react-icon

Package Overview
Dependencies
2
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bearei/react-icon


Version published
Maintainers
1
Created

Readme

Source

react-icon

A basic icon component that supports react and native react.

Installation

yarn add @bearei/react-icon --save

Parameters

NameTypeRequiredDescription
size'small','medium','large'Set the icon size
widthstring,numberSet the width of the icon
heightstring,numberSet the icon height
fillstringSet the icon fill color
contentReact.ReactNodeThe main area content of the icon
renderMainfunction(props)Render the icon main
renderContainerfunction(props,element)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 data-cy="icon">{'icon'}</i>}
    renderContainer={({id}, element) => (
      <div data-cy="container" data-id={id} tabIndex={1}>
        {element}
      </div>
    )}
  />
);

ReactDOM.render(icon, container);

Keywords

FAQs

Last updated on 25 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc