Alert

Usage

import { Alert } from 'nila';

Basic

<Alert>I'm an Alert</Alert>

Bordered

{/* Left Border */}
<Alert color="blue" className="border-l-4">...</Alert>
{/* Top Border */}
<Alert color="pink" className="border-t-4">...</Alert>

With Icon

<Alert color="green" icon>
  <CheckCircleIcon className="flex-shrink-0 w-5 h-5" />
  <span>...</span>
</Alert>

With Close Button

<Alert color="blue" icon closable>
  <CheckCircleIcon className="flex-shrink-0 w-5 h-5" />
  <span>...</span>
</Alert>

With Link

<Alert color="yellow" icon>
  <XCircleIcon className="flex-shrink-0 w-5 h-5" />
  <div className="flex flex-col justify-between w-full md:items-center md:flex-row">
    <span>...</span>
    <a href="#" className="mt-3 underline md:mt-0">With a link</a>
  </div>
</Alert>

Light Variant

<Alert>...</Alert>
<Alert color="red">...</Alert>
<Alert color="yellow">...</Alert>
<Alert color="green">...</Alert>
<Alert color="blue">...</Alert>
<Alert color="indigo">...</Alert>
<Alert color="purple">...</Alert>
<Alert color="pink">...</Alert>

Solid Variant

<Alert variant="solid">...</Alert>
<Alert variant="solid" color="red">...</Alert>
<Alert variant="solid" color="yellow">...</Alert>
<Alert variant="solid" color="green">...</Alert>
<Alert variant="solid" color="blue">...</Alert>
<Alert variant="solid" color="indigo">...</Alert>
<Alert variant="solid" color="purple">...</Alert>
<Alert variant="solid" color="pink">...</Alert>