feat: add inline message component
This commit is contained in:
parent
49ed4e2b2c
commit
9ccbd9dcce
12
app/components/ui/inline-message.tsx
Normal file
12
app/components/ui/inline-message.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { AlertCircle } from 'lucide-react';
|
||||
import { Text } from '~/components/ui/text';
|
||||
|
||||
export function InlineMessage({ tone, children }: { tone: 'danger' | 'warning'; children: ReactNode }) {
|
||||
return (
|
||||
<Text role={tone === 'danger' ? 'alert' : undefined} variant='caption' tone={tone} className='flex items-center gap-1.5'>
|
||||
<AlertCircle size={13} className='shrink-0' />
|
||||
{children}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user