Improved missing placeholder.
This commit is contained in:
parent
6725b1c399
commit
f289bbb6b2
@ -60,7 +60,11 @@ const AppContent = () => {
|
||||
theme={themeConfig}
|
||||
renderEmpty={() => (
|
||||
<div style={{ margin: '32px' }}>
|
||||
<MissingPlaceholder message='No data.' hasBackground={false} />
|
||||
<MissingPlaceholder
|
||||
message='No data.'
|
||||
hasBackground={false}
|
||||
hasBorder={false}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
>
|
||||
|
||||
@ -4,13 +4,22 @@ import PropTypes from 'prop-types'
|
||||
|
||||
const { Text } = Typography
|
||||
|
||||
const MissingPlaceholder = ({ message, hasBackground = true }) => {
|
||||
const MissingPlaceholder = ({
|
||||
message,
|
||||
hasBackground = true,
|
||||
hasBorder = true
|
||||
}) => {
|
||||
return (
|
||||
<Card
|
||||
size='small'
|
||||
style={{
|
||||
background: hasBackground == false ? 'transparent' : undefined,
|
||||
border: hasBackground == false ? '1px solid rgb(0 0 0 / 7%)' : undefined
|
||||
border:
|
||||
hasBorder == false
|
||||
? 'none'
|
||||
: hasBackground == false
|
||||
? '1px solid rgb(0 0 0 / 7%)'
|
||||
: undefined
|
||||
}}
|
||||
>
|
||||
<Flex
|
||||
@ -32,7 +41,8 @@ const MissingPlaceholder = ({ message, hasBackground = true }) => {
|
||||
|
||||
MissingPlaceholder.propTypes = {
|
||||
message: PropTypes.string.isRequired,
|
||||
hasBackground: PropTypes.bool
|
||||
hasBackground: PropTypes.bool,
|
||||
hasBorder: PropTypes.bool
|
||||
}
|
||||
|
||||
export default MissingPlaceholder
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user