chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
23
packages/admin-ui/src/components/Status.jsx
Normal file
23
packages/admin-ui/src/components/Status.jsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import Chip from '@mui/material/Chip'
|
||||
import React from 'react'
|
||||
|
||||
const Status = ({ status }) => {
|
||||
return <Chip color={status.type} label={status.label} />
|
||||
}
|
||||
|
||||
const MainStatus = ({ statuses }) => {
|
||||
const mainStatus =
|
||||
statuses.find(s => s.type === 'error') ||
|
||||
statuses.find(s => s.type === 'warning') ||
|
||||
statuses[0]
|
||||
const plus = { label: `+${statuses.length - 1}`, type: mainStatus.type }
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Status status={mainStatus} />
|
||||
{statuses.length > 1 && <Status status={plus} />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export { Status, MainStatus }
|
||||
Loading…
Add table
Add a link
Reference in a new issue