Added reusable component for a missing placeholder.
This commit is contained in:
parent
aee3370b6d
commit
e688bd891d
29
src/components/Dashboard/common/MissingPlaceholder.jsx
Normal file
29
src/components/Dashboard/common/MissingPlaceholder.jsx
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import { Card, Flex, Typography } from 'antd'
|
||||||
|
import InfoCircleIcon from '../../Icons/InfoCircleIcon'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
|
const { Text } = Typography
|
||||||
|
|
||||||
|
const MissingPlaceholder = ({ message }) => {
|
||||||
|
return (
|
||||||
|
<Card size='small'>
|
||||||
|
<Flex
|
||||||
|
justify='center'
|
||||||
|
gap={'small'}
|
||||||
|
style={{ height: '100%' }}
|
||||||
|
align='center'
|
||||||
|
>
|
||||||
|
<Text type='secondary'>
|
||||||
|
<InfoCircleIcon />
|
||||||
|
</Text>
|
||||||
|
<Text type='secondary'>{message}</Text>
|
||||||
|
</Flex>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
MissingPlaceholder.propTypes = {
|
||||||
|
message: PropTypes.string.isRequired
|
||||||
|
}
|
||||||
|
|
||||||
|
export default MissingPlaceholder
|
||||||
Loading…
x
Reference in New Issue
Block a user