Function
Banner
({
actionClassName,
actionDisabled,
actionLabel,
actionProps,
actionVariant = 'default',
children,
className,
contentClassName,
onAction,
text,
textClassName,
variant,
...props
}: BannerProps)
Source from the content-addressed store, hash-verified
| 33 | } |
| 34 | |
| 35 | export function Banner({ |
| 36 | actionClassName, |
| 37 | actionDisabled, |
| 38 | actionLabel, |
| 39 | actionProps, |
| 40 | actionVariant = 'default', |
| 41 | children, |
| 42 | className, |
| 43 | contentClassName, |
| 44 | onAction, |
| 45 | text, |
| 46 | textClassName, |
| 47 | variant, |
| 48 | ...props |
| 49 | }: BannerProps) { |
| 50 | return ( |
| 51 | <div className={cn(bannerVariants({ variant }), className)} {...props}> |
| 52 | {children ?? ( |
| 53 | <div |
| 54 | className={cn( |
| 55 | 'mx-auto flex max-w-[1400px] items-center justify-between gap-3', |
| 56 | contentClassName |
| 57 | )} |
| 58 | > |
| 59 | <p className={cn('text-[13px]', textClassName)}>{text}</p> |
| 60 | {actionLabel ? ( |
| 61 | <Button |
| 62 | variant={actionVariant} |
| 63 | className={cn('h-[28px] shrink-0 px-2 text-[12px]', actionClassName)} |
| 64 | onClick={onAction} |
| 65 | disabled={actionDisabled} |
| 66 | {...actionProps} |
| 67 | > |
| 68 | {actionLabel} |
| 69 | </Button> |
| 70 | ) : null} |
| 71 | </div> |
| 72 | )} |
| 73 | </div> |
| 74 | ) |
| 75 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected