Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abaabil.icon

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abaabil.icon

  • 0.0.19
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

Icon Component

npm version npm downloads

The Icon component is a versatile and customizable SVG icon component built with React. It supports different sizes and allows for additional class names to be applied for further customization.

Usage

import * as React from 'react';
import Icon from './path-to-icon';

const App = () => (
  <div>
    <Icon id="settings" size="base" />
    <Icon id="check" size="lg" className="text-green-500" />
    <Icon id="warning" size="sm" className="text-red-500" />
  </div>
);

export default App;

Props

PropTypeDefaultDescription
idstringnullThe ID of the icon to use from the SVG sprite.
sizestringbaseThe size of the icon. Can be sm, base, or lg.
classNamestring''Additional class names to apply to the icon.

Sizes

  • sm: Small icon size.
  • base: Base icon size.
  • lg: Large icon size.

Example

import * as React from 'react';
import Icon from './path-to-icon';

const Example = () => (
  <div>
    <Icon id="settings" size="base" />
    <Icon id="check" size="lg" className="text-green-500" />
    <Icon id="warning" size="sm" className="text-red-500" />
  </div>
);

export default Example;

This example demonstrates various ways to use the Icon component, showcasing different sizes and custom class names for further styling.

FAQs

Package last updated on 03 Aug 2024

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc