mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 21:59:00 +02:00
9c16a85295
Remove Font Awesome in BS5 GitOrigin-RevId: 3ee9b136ac9ecda57ba9985d1da7d7a7e6b275e6
28 lines
606 B
TypeScript
28 lines
606 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import MaterialIcon from '@/shared/components/material-icon'
|
|
|
|
type CloseProps = {
|
|
onDismiss: React.MouseEventHandler<HTMLButtonElement>
|
|
variant?: 'light' | 'dark'
|
|
}
|
|
|
|
function Close({ onDismiss, variant = 'light' }: CloseProps) {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<button
|
|
type="button"
|
|
className={`close float-end ${variant}`}
|
|
onClick={onDismiss}
|
|
>
|
|
<MaterialIcon
|
|
type="close"
|
|
className="align-text-bottom"
|
|
accessibilityLabel={t('close')}
|
|
/>
|
|
</button>
|
|
)
|
|
}
|
|
|
|
export default Close
|