mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
23 lines
464 B
TypeScript
23 lines
464 B
TypeScript
import React, { ReactElement } from 'react'
|
|
import classNames from 'classnames/bind'
|
|
import styles from './Status.module.css'
|
|
|
|
const cx = classNames.bind(styles)
|
|
|
|
export default function Status({
|
|
state,
|
|
className
|
|
}: {
|
|
state?: string
|
|
className?: string
|
|
}): ReactElement {
|
|
const styleClasses = cx({
|
|
status: true,
|
|
warning: state === 'warning',
|
|
error: state === 'error',
|
|
[className]: className
|
|
})
|
|
|
|
return <i className={styleClasses} />
|
|
}
|