Skip to content

Commit baab478

Browse files
committed
style: optimize layout
1 parent 7fd125e commit baab478

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/JsonSchemaEditor/SchemaItem/index.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -702,10 +702,11 @@ function SchemaItem(props: SchemaItemProps) {
702702
<Form.List name="enums">
703703
{(fields, { add, remove }) => (
704704
<>
705-
<Row>
705+
<Row gutter={6}>
706706
{fields.map(({ key, name, ...restField }) => (
707707
<Col span={12} key={key}>
708708
<Row
709+
gutter={2}
709710
justify={'start'}
710711
align={'middle'}
711712
style={{ marginBottom: 6 }}
@@ -728,15 +729,21 @@ function SchemaItem(props: SchemaItemProps) {
728729
)}
729730
</Form.Item>
730731
</Col>
731-
<Col flex={'36px'} style={{ paddingLeft: 7 }}>
732-
<DeleteOutlined onClick={() => remove(name)} />
732+
<Col flex={'24px'}>
733+
<Button
734+
icon={<DeleteOutlined />}
735+
size={'small'}
736+
type={'text'}
737+
danger={true}
738+
onClick={() => remove(name)}
739+
/>
733740
</Col>
734741
</Row>
735742
</Col>
736743
))}
737744
</Row>
738745
<Row>
739-
<Col span={12}>
746+
<Col span={6}>
740747
<Form.Item noStyle>
741748
<Button
742749
onClick={() => add()}

0 commit comments

Comments
 (0)