overleaf/services/web/frontend/js/features/ui/components/ol/ol-spinner.tsx
Tim Down 4138f9707a Merge pull request #20860 from overleaf/td-bs5-history-versions-list
Migrate history versions list to Bootstrap 5

GitOrigin-RevId: 4e006ad353cb11eadaefb2df41d2b8591003c664
2024-10-14 11:11:01 +00:00

31 lines
751 B
TypeScript

import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
import Icon from '@/shared/components/icon'
import { Spinner } from 'react-bootstrap-5'
import classNames from 'classnames'
export type OLSpinnerSize = 'sm' | 'lg'
function OLSpinner({ size = 'sm' }: { size: OLSpinnerSize }) {
return (
<BootstrapVersionSwitcher
bs3={
<Icon
type="refresh"
fw
spin
className={classNames({ 'fa-2x': size === 'lg' })}
/>
}
bs5={
<Spinner
size={size === 'sm' ? 'sm' : undefined}
animation="border"
aria-hidden="true"
role="status"
/>
}
/>
)
}
export default OLSpinner