forked from rajun/ar-test
feat: add alert component
This commit is contained in:
parent
02259df5d3
commit
bc4e2220b1
14
app/components/ui/alert.tsx
Normal file
14
app/components/ui/alert.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user