New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@symbo.ls/icon

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbo.ls/icon

A simple and flexible IconText component that displays an icon alongside some text. The component extends the Flex component and allows for easy customization.

  • 2.11.197
  • npm
  • Socket score

Version published
Weekly downloads
102
decreased by-47.15%
Maintainers
5
Weekly downloads
 
Created

IconText Component

A simple and flexible IconText component that displays an icon alongside some text. The component extends the Flex component and allows for easy customization.

Props

  • align: (string) Alignment of the icon and text. Default value is 'center center'.
  • lineHeight: (number) Line height of the text. Default value is 1.
  • icon: (string) The name of the icon to be displayed. This prop will be removed in the future.
  • name: (string) The name of the icon to be displayed.
  • text: (string) The text to be displayed alongside the icon.

Usage

import { IconText } from 'smbls';

const MyComponent = {
  IconText: {
    icon: 'star',
    text: 'Hello, World!'
  }
}

Customization

You can easily customize the appearance of the IconText component by passing additional props to the Icon or text components.

For example, you can change the color and size of the icon:

const MyComponent = {
  IconText: {
    icon: {
      name: 'star',
      color: 'blue'
    },
    text: 'Hello, World!'
  }
}

FAQs

Package last updated on 28 Sep 2023

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