mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
24 lines
516 B
TypeScript
24 lines
516 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
|
|
type CloseProps = {
|
|
onDismiss: React.MouseEventHandler<HTMLButtonElement>
|
|
variant?: 'light' | 'dark'
|
|
}
|
|
|
|
function Close({ onDismiss, variant = 'light' }: CloseProps) {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<button
|
|
type="button"
|
|
className={`close pull-right ${variant}`}
|
|
onClick={onDismiss}
|
|
>
|
|
<span aria-hidden="true">×</span>
|
|
<span className="sr-only">{t('close')}</span>
|
|
</button>
|
|
)
|
|
}
|
|
|
|
export default Close
|