b666cd2657
* feat: initial rewrite without status indicators * feat: status icon as a component and add to the node setup * feat: added input list item component * feat: improved the topology status info * fix: disabled state of the buttons * chore: removed unused components * chore: remove debug console log * fix: deposit modal helper text
29 lines
642 B
TypeScript
29 lines
642 B
TypeScript
import type { ReactElement } from 'react'
|
|
import { CircularProgress } from '@material-ui/core'
|
|
|
|
interface Props {
|
|
isOk: boolean
|
|
isLoading?: boolean
|
|
size?: number | string
|
|
className?: string
|
|
}
|
|
|
|
export default function StatusIcon({ isOk, size, className, isLoading }: Props): ReactElement {
|
|
const s = size || '1rem'
|
|
|
|
if (isLoading) return <CircularProgress size={s} className={className} />
|
|
|
|
return (
|
|
<span
|
|
className={className}
|
|
style={{
|
|
backgroundColor: isOk ? '#1de600' : '#ff3a52',
|
|
height: s,
|
|
width: s,
|
|
borderRadius: '50%',
|
|
display: 'inline-block',
|
|
}}
|
|
/>
|
|
)
|
|
}
|