Function
ModalHeader
({
title,
text,
onClose,
className,
}: ModalHeaderProps)
Source from the content-addressed store, hash-verified
| 61 | } |
| 62 | |
| 63 | export function ModalHeader({ |
| 64 | title, |
| 65 | text, |
| 66 | onClose, |
| 67 | className, |
| 68 | }: ModalHeaderProps) { |
| 69 | return ( |
| 70 | <div |
| 71 | className={cn( |
| 72 | 'relative -m-6 mb-4 flex justify-between rounded-t-lg p-6 pb-0', |
| 73 | className |
| 74 | )} |
| 75 | > |
| 76 | <div className="row relative w-full justify-between gap-4"> |
| 77 | <div className="col flex-1 gap-2"> |
| 78 | <DialogTitle>{title}</DialogTitle> |
| 79 | {!!text && ( |
| 80 | <div className="text-lg text-muted-foreground leading-normal"> |
| 81 | {text} |
| 82 | </div> |
| 83 | )} |
| 84 | </div> |
| 85 | {onClose !== false && ( |
| 86 | <Button |
| 87 | className="-mt-2" |
| 88 | onClick={() => (onClose ? onClose() : popModal())} |
| 89 | size="sm" |
| 90 | variant="ghost" |
| 91 | > |
| 92 | <X className="h-4 w-4" /> |
| 93 | <span className="sr-only">Close</span> |
| 94 | </Button> |
| 95 | )} |
| 96 | </div> |
| 97 | </div> |
| 98 | ); |
| 99 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected