Fix UI issues
This commit is contained in:
@@ -18,7 +18,7 @@ export interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClos
|
||||
}
|
||||
|
||||
export interface ModalHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
||||
title?: string;
|
||||
title?: string | React.ReactNode;
|
||||
subtitle?: string;
|
||||
showCloseButton?: boolean;
|
||||
onClose?: () => void;
|
||||
@@ -238,12 +238,18 @@ const ModalHeader = forwardRef<HTMLDivElement, ModalHeaderProps>(({
|
||||
<div className="flex items-start justify-between">
|
||||
<div className="flex-1">
|
||||
{title && (
|
||||
<h2
|
||||
id="modal-title"
|
||||
className="text-lg font-semibold text-[var(--text-primary)]"
|
||||
>
|
||||
{title}
|
||||
</h2>
|
||||
typeof title === 'string' ? (
|
||||
<h2
|
||||
id="modal-title"
|
||||
className="text-lg font-semibold text-[var(--text-primary)]"
|
||||
>
|
||||
{title}
|
||||
</h2>
|
||||
) : (
|
||||
<div id="modal-title">
|
||||
{title}
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
{subtitle && (
|
||||
<p className="mt-1 text-sm text-[var(--text-secondary)]">
|
||||
|
||||
Reference in New Issue
Block a user