mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 05:51:56 +08:00
22 lines
507 B
TypeScript
22 lines
507 B
TypeScript
import React from 'react'
|
|
import classnames from 'classnames'
|
|
import { BaseComponentProps } from '@models/BaseProps'
|
|
import { Spinner } from './Spinner'
|
|
|
|
import './style.scss'
|
|
|
|
interface LoadingProps extends BaseComponentProps {
|
|
visible: boolean
|
|
}
|
|
|
|
export function Loading (props: LoadingProps) {
|
|
const classname = classnames('loading', 'visible')
|
|
return props.visible
|
|
? (
|
|
<div className={classname}>
|
|
<Spinner />
|
|
</div>
|
|
)
|
|
: null
|
|
}
|