Button

Component

A component that renders a button element with optional icon and different variants.

Usage

// Render a primary button with text
<Button variant="primary">Click Me</Button>
// Render a secondary button with an icon
<Button icon="https://example.com/icon.svg" variant="secondary" />
// Render a destructive button with icon and text
<Button icon="https://example.com/warning-icon.svg" variant="destructive">
  Delete
</Button>

Props

icon?

The URL of the icon to display on the button.

type

string

variant?

The variant of the button.

type

'primary' | 'secondary' | 'destructive'

default value

'primary'