26 lines
1,011 B
TypeScript
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>
|