overleaf/services/web/frontend/js/shared/components/close.tsx
Jimmy Domagala-Tang 462b7a2256 Merge pull request #14379 from overleaf/jdt-history-onboarding
history onboarding popover

GitOrigin-RevId: 4afe2ae54317341df64e83bed0b3c94875eb10a0
2023-08-30 08:05:21 +00:00

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">&times;</span>
<span className="sr-only">{t('close')}</span>
</button>
)
}
export default Close