ar-test/app/components/ui/inline-message.tsx

13 lines
485 B
TypeScript

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>
);
}