View on GitHub

Icon Button

A icon button renders an icon within a button.


Usage

<script>
	import { IconButton } from 'figblocks';
	import { IconStyles } from 'figblocks/icons';
</script>

<IconButton iconSvg={IconStyles} />
<IconButton iconSvg={IconStyles} active />

Active state

Pass the active prop to set the button state to active.

<IconButton iconSvg={IconStyles} active />

Disabled state

Pass the disabled prop to disable the button.

<IconButton disabled iconSvg={IconStyles} />

Props

active boolean false If true, sets the button state to active.
disabled boolean false If true, the button will be disabled.
iconSvg string undefined Refer Icon component.
iconText string undefined Refer Icon component.
class string undefined Custom CSS classname for styling

Events