15 lines
545 B
TypeScript
15 lines
545 B
TypeScript
import type { ReactNode } from 'react';
|
|
import { AlertCircle } from 'lucide-react';
|
|
import { Text } from '~/components/ui/text';
|
|
import { toneSurface } from '~/components/ui/tone';
|
|
import { cn } from '~/lib/utils';
|
|
|
|
export function Alert({ children }: { children: ReactNode }) {
|
|
return (
|
|
<Text role='alert' tone='danger' className={cn(toneSurface({ tone: 'danger' }), 'flex items-start gap-2.5 rounded-xl px-4 py-3')}>
|
|
<AlertCircle size={16} className='mt-0.5 shrink-0' />
|
|
{children}
|
|
</Text>
|
|
);
|
|
}
|