'use client';
import { forwardRef, HTMLAttributes } from 'react';
import styles from './neon-alert.module.css';
export interface NeonAlertProps extends HTMLAttributes {
/** Alert type */
variant?: 'info' | 'success' | 'warning' | 'error';
/** Alert title */
title?: string;
/** Dismissible with close button */
dismissible?: boolean;
/** Close callback */
onDismiss?: () => void;
}
export const NeonAlert = forwardRef(
(
{
children,
variant = 'info',
title,
dismissible = false,
onDismiss,
className,
...props
},
ref
) => {
return (
{title &&
{title}
}
{children}
{dismissible && (
)}
);
}
);
NeonAlert.displayName = 'NeonAlert';
export default NeonAlert;