Extension login infinite loading #198

Merged
enes merged 13 commits from 196-ext-login-infinite-loading into staging 2024-09-16 12:27:44 +00:00
2 changed files with 14 additions and 4 deletions
Showing only changes of commit 4d1e672268 - Show all commits

View File

@ -1,13 +1,14 @@
import { createPortal } from 'react-dom'
import styles from './style.module.scss'
import { PropsWithChildren } from 'react'
interface Props {
desc?: string
variant?: 'small' | 'default'
}
export const LoadingSpinner = (props: Props) => {
const { desc, variant = 'default' } = props
export const LoadingSpinner = (props: PropsWithChildren<Props>) => {
const { desc, children, variant = 'default' } = props
switch (variant) {
case 'small':
@ -28,7 +29,12 @@ export const LoadingSpinner = (props: Props) => {
data-variant={variant}
>
<div className={styles.loadingSpinner}></div>
{desc && <p className={styles.loadingSpinnerDesc}>{desc}</p>}
{desc && (
<div className={styles.loadingSpinnerDesc}>
{desc}
{children}
</div>
)}
</div>
</div>,
document.getElementById('root')!

View File

@ -42,11 +42,15 @@
width: 100%;
padding: 15px;
border-top: solid 1px rgba(0, 0, 0, 0.1);
text-align: center;
color: rgba(0, 0, 0, 0.5);
font-size: 16px;
font-weight: 400;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
@keyframes spin {