mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
462b7a2256
history onboarding popover GitOrigin-RevId: 4afe2ae54317341df64e83bed0b3c94875eb10a0
23 lines
516 B
TypeScript
23 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
|