Icon

Component

Icon component that renders an icon using either a provided URL or a predefined icon type.

Usage

// Render an icon from a predefined type
<Icon icon="home" size={24} color="blue" />
// Render an icon from a URL
<Icon iconUrl="https://example.com/icon.svg" size={32} />
// Render an icon with additional class names and styles
<Icon icon="settings" className="my-icon" style={{ margin: '10px' }} />

Props

className?

The additional class names to apply to the icon.

type

string

color?

The color of the icon.

type

string

default value

'currentColor'

icon?

The type of the icon to display.

type

IconType

iconUrl?

The URL of the icon to display.

type

string

size?

The size of the icon.

type

number

default value

16