@@ -2,6 +2,7 @@ import Preview from 'part:@sanity/base/preview'
2
2
import { useUserColorManager } from '@sanity/base/user-color'
3
3
import { isKeyedObject , TypedObject } from '@sanity/types'
4
4
import React from 'react'
5
+ import { Box , Flex } from '@sanity/ui'
5
6
import {
6
7
Annotation ,
7
8
ArrayDiff ,
@@ -16,7 +17,6 @@ import {
16
17
} from '../../../diff'
17
18
import { Checkbox } from '../../boolean/preview'
18
19
import { isEqual } from '../util/arrayUtils'
19
- import styles from './ArrayOfOptionsFieldDiff.css'
20
20
21
21
interface NamedListOption {
22
22
title ?: string
@@ -51,18 +51,20 @@ export const ArrayOfOptionsFieldDiff: DiffComponent<ArrayDiff> = ({diff, schemaT
51
51
const color = getAnnotationColor ( colorManager , annotation )
52
52
const action = isPresent ? 'Added' : 'Removed'
53
53
return (
54
- < div className = { styles . item } key = { getItemKey ( diff , index ) } >
54
+ < Flex align = "center" key = { getItemKey ( diff , index ) } >
55
55
< DiffTooltip annotations = { annotation ? [ annotation ] : [ ] } description = { action } >
56
- < div className = { styles . checkboxes } >
56
+ < Flex align = "center" >
57
57
< Checkbox checked = { ! isPresent } color = { color } />
58
- < FromToArrow />
58
+ < Box margin = { 2 } >
59
+ < FromToArrow />
60
+ </ Box >
59
61
< Checkbox checked = { isPresent } color = { color } />
60
- </ div >
62
+ </ Flex >
61
63
</ DiffTooltip >
62
- < div className = { styles . label } >
64
+ < Flex align = "center" >
63
65
< ItemPreview value = { title || value } memberType = { memberType } />
64
- </ div >
65
- </ div >
66
+ </ Flex >
67
+ </ Flex >
66
68
)
67
69
} ) }
68
70
</ div >
@@ -102,13 +104,13 @@ function sortItems(itemA: NormalizedListOption, itemB: NormalizedListOption): nu
102
104
103
105
function ItemPreview ( { value, memberType} : { memberType ?: SchemaType ; value : unknown } ) {
104
106
return (
105
- < div className = { styles . itemPreview } >
107
+ < Box marginX = { 2 } marginY = { 1 } >
106
108
{ typeof value === 'string' || typeof value === 'number' ? (
107
109
value
108
110
) : (
109
111
< Preview type = { memberType } value = { value } layout = "default" />
110
112
) }
111
- </ div >
113
+ </ Box >
112
114
)
113
115
}
114
116
0 commit comments