mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
719da5fbd8
IDE page: connection manager and loading screen GitOrigin-RevId: 2cbc8c09aeb36a14eae66da78b267c7a830fb71a
39 lines
996 B
TypeScript
39 lines
996 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
|
|
type LoadingBrandedTypes = {
|
|
loadProgress: number // Percentage
|
|
label?: string
|
|
error?: string | null
|
|
}
|
|
|
|
export default function LoadingBranded({
|
|
loadProgress,
|
|
label,
|
|
error,
|
|
}: LoadingBrandedTypes) {
|
|
const { t } = useTranslation()
|
|
return (
|
|
<div className="loading-screen-brand-container">
|
|
<div
|
|
className="loading-screen-brand"
|
|
style={{ height: `${loadProgress}%` }}
|
|
/>
|
|
{error ? (
|
|
<p className="loading-screen-error">{error}</p>
|
|
) : (
|
|
<div className="h3 loading-screen-label" aria-live="polite">
|
|
{label || t('loading')}
|
|
<span className="loading-screen-ellip" aria-hidden="true">
|
|
.
|
|
</span>
|
|
<span className="loading-screen-ellip" aria-hidden="true">
|
|
.
|
|
</span>
|
|
<span className="loading-screen-ellip" aria-hidden="true">
|
|
.
|
|
</span>
|
|
</div>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|