Improved missing placeholder.

This commit is contained in:
Tom Butcher 2026-05-16 22:14:27 +01:00
parent 6725b1c399
commit f289bbb6b2
2 changed files with 18 additions and 4 deletions

View File

@ -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>
)}
>

View File

@ -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