Refactor PropertyChanges component to replace Space with Flex for improved layout and spacing in rendering property changes.

This commit is contained in:
Tom Butcher 2025-09-05 23:21:00 +01:00
parent 09bf3b81c7
commit d07e2be330

View File

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