New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@tdcerhverv/icon

Package Overview
Dependencies
Maintainers
22
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@tdcerhverv/icon

Icon component

unpublished
latest
Source
npmnpm
Version
2.7.2
Version published
Weekly downloads
0
Maintainers
22
Weekly downloads
 
Created
Source

Icon component

The icon component is a simple wrapper component that takes an SVG react component and handles sizes, classes and click handlers.
It doesn't render anything by itself but it applies properties to the supplied SVG component.

Usage

Import like this:

import { Icon } from '@tdcerhverv/icon';

You will also need an actual icon, eg.

import Success from '@tdcerhverv/parrotfish/dist/icons/Icons/Success.svg';

Use like this:

<Icon icon={Success} size={16} />

Props

export interface IIcon extends SVGProps<SVGSVGElement> {
  icon: JSXElementConstructor<SVGProps<SVGSVGElement>>;
  size?: 8 | 12 | 16 | 20 | 24 | 28 | 32 | 40 | 48 | 56 | 64;
  inline?: boolean;
}

Notes:

size is optional and will default to 24.

inline is optional and will align the icon better when used as inline element.

All standard element properties (e.g. className, id, etc.) is supported, see the inherited properties here:
https://developer.mozilla.org/en-US/docs/Web/API/SVGSVGElement.

Sizes

SizeSpecificationEquivalent
80.5rem8px
120.75rem12px
161rem16px
201.25rem20px
24 (default)1.5rem24px
281.75rem28px
322rem32px
402.5rem40px
483rem48px
563.5rem56px
644rem64px

Up to size 32 has increments of 4 pixels and above size 32 has increments of 8 pixels.

Tags

icon

FAQs

Package last updated on 01 Jun 2021

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