import { component$, Slot, type PropsOf } from '@builder.io/qwik'; import { cn } from '@qwik-ui/utils'; import { cva, type VariantProps } from 'class-variance-authority'; export const alertVariants = cva( 'relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:top-4 [&>svg]:left-4 [&>svg]:text-foreground [&>svg+div]:translate-y-[-3px] [&>svg~*]:pl-7', { variants: { look: { neutral: 'bg-background text-foreground', alert: 'border-alert/60 text-alert [&>svg]:text-alert', primary: 'border-primary', secondary: 'border-secondary', }, }, defaultVariants: { look: 'neutral', }, }, ); type AlertProps = PropsOf<'div'> & VariantProps; const Root = component$(({ look, ...props }) => { return ( ); }); const Title = component$>(({ ...props }) => { return (
); }); const Description = component$>(({ ...props }) => { return (
); }); export const Alert = { Root, Title, Description, };