Refactor PropertyChanges component to replace Space with Flex for improved layout and spacing in rendering property changes.
This commit is contained in:
parent
09bf3b81c7
commit
d07e2be330
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Descriptions, Typography, Space } from 'antd'
|
import { Descriptions, Typography, Flex } from 'antd'
|
||||||
import { getModelProperty } from '../../../database/ObjectModels'
|
import { getModelProperty } from '../../../database/ObjectModels'
|
||||||
import ObjectProperty from './ObjectProperty'
|
import ObjectProperty from './ObjectProperty'
|
||||||
import ArrowRightIcon from '../../Icons/ArrowRightIcon'
|
import ArrowRightIcon from '../../Icons/ArrowRightIcon'
|
||||||
@ -51,7 +51,7 @@ const PropertyChanges = ({ type, value }) => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Descriptions.Item key={key} label={changeProperty.label}>
|
<Descriptions.Item key={key} label={changeProperty.label}>
|
||||||
<Space>
|
<Flex gap={'small'}>
|
||||||
{value?.old ? (
|
{value?.old ? (
|
||||||
<ObjectProperty
|
<ObjectProperty
|
||||||
{...changeProperty}
|
{...changeProperty}
|
||||||
@ -73,7 +73,7 @@ const PropertyChanges = ({ type, value }) => {
|
|||||||
objectData={value?.new}
|
objectData={value?.new}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</Space>
|
</Flex>
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user