Nychthemeron/packages/library/src/components/ui/alert/index.ts
Matthew L McPeak 38674be217
All checks were successful
ci / build (push) Successful in 35s
ci / publish (push) Successful in 11s
ci / publish-docs (push) Successful in 1m4s
Inital Commit
2026-07-15 20:47:53 -04:00

26 lines
1,011 B
TypeScript

import type { VariantProps } from 'class-variance-authority'
import { cva } from 'class-variance-authority'
export { default as Alert } from './Alert.vue'
export { default as AlertAction } from './AlertAction.vue'
export { default as AlertDescription } from './AlertDescription.vue'
export { default as AlertTitle } from './AlertTitle.vue'
export const alertVariants = cva(
'relative grid w-full gap-1 rounded-lg border border-l-4 px-3 py-2.5 text-sm text-foreground has-data-[slot=alert-action]:pr-10',
{
variants: {
variant: {
info: 'bg-info/15 border-info/30 border-l-info',
success: 'bg-success/15 border-success/30 border-l-success',
warning: 'bg-warning/15 border-warning/30 border-l-warning',
danger: 'bg-destructive/15 border-destructive/30 border-l-destructive',
secondary: 'bg-secondary/40 border-border',
},
},
defaultVariants: {
variant: 'info',
},
},
)
export type AlertVariants = VariantProps<typeof alertVariants>