mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 22:29:01 +02:00
3b5ea89a1c
* Update test for the loading spinner component * Create a story for the loading spinner component * Move role and use CSS for spacing instead * Add a classname prop * Reuse LoadingSpinner * Use OLSpinner instead of Spinner * Use data-testid since status role was moved * Wait for journals to load * Use `isLoading` prop instead and fix the button's height * Use `isLoading` prop instead * Use LoadingSpinner instead and remove spacing * Update test for the loading spinner component * Use `isLoading` prop instead * Add aria-describedby to layout button for processing state * Replace `spinner` to `ol-spinner` * Scope status * Remove redundant `div.loading` --------- Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com> GitOrigin-RevId: 8f43b991f8f458b2abd5a4661913ac9b972d892a
24 lines
405 B
TypeScript
24 lines
405 B
TypeScript
import { Spinner } from 'react-bootstrap'
|
|
|
|
export type OLSpinnerSize = 'sm' | 'lg'
|
|
|
|
function OLSpinner({
|
|
size = 'sm',
|
|
className,
|
|
}: {
|
|
size?: OLSpinnerSize
|
|
className?: string
|
|
}) {
|
|
return (
|
|
<Spinner
|
|
size={size === 'sm' ? 'sm' : undefined}
|
|
animation="border"
|
|
aria-hidden="true"
|
|
className={className}
|
|
data-testid="ol-spinner"
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default OLSpinner
|