import React, { type HTMLAttributes } from 'react'
import Icon from '../../atoms/Icon'
import IconButton, { type IconButtonProps } from '../IconButton'
export interface ModalHeaderProps extends HTMLAttributes {
/**
* Title for header modal.
*/
title: string
/**
* Description for header modal.
*/
description?: string
/**
* Props for the Close Button component.
*/
closeBtnProps?: Partial>
/**
* Function called when dismiss button is clicked.
*/
onClose?: () => void
}
const ModalHeader = ({
onClose,
title,
closeBtnProps = {},
description,
}: ModalHeaderProps) => {
return (
{onClose && (
}
onClick={() => onClose?.()}
{...closeBtnProps}
/>
)}
{title}
{description && {description}
}
)
}
export default ModalHeader