Skip to content

Commit f78bc01

Browse files
committed
Fix spacing for Secrets
Signed-off-by: Trung Nguyen <[email protected]>
1 parent b9a5c63 commit f78bc01

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

src/extension/ui/src/components/tile/ConfigEditor.tsx

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { v1 } from '@docker/extension-api-client-types';
22
import CheckOutlined from '@mui/icons-material/CheckOutlined';
33
import CloseOutlined from '@mui/icons-material/CloseOutlined';
44
import {
5+
ButtonGroup,
56
CircularProgress,
67
IconButton,
78
Stack,
@@ -49,9 +50,9 @@ const ConfigEditor = ({
4950
() =>
5051
configSchema
5152
? deepFlattenObject({
52-
...catalogItem.configTemplate,
53-
...existingConfigForItem,
54-
})
53+
...catalogItem.configTemplate,
54+
...existingConfigForItem,
55+
})
5556
: {},
5657
[catalogItem.configTemplate, existingConfigForItem, configSchema]
5758
);
@@ -88,7 +89,14 @@ const ConfigEditor = ({
8889
const isSaving = savingKeys.has(key);
8990

9091
return (
91-
<Stack key={key} direction="row" spacing={2}>
92+
<Stack
93+
key={key}
94+
direction="row"
95+
spacing={2}
96+
sx={{
97+
alignItems: 'center',
98+
}}
99+
>
92100
<TextField
93101
fullWidth
94102
size="small"
@@ -100,12 +108,13 @@ const ConfigEditor = ({
100108
disabled={isSaving}
101109
/>
102110
{edited && (
103-
<Stack direction="row" spacing={2}>
111+
<>
104112
{isSaving ? (
105113
<CircularProgress size={24} />
106114
) : (
107-
<Stack direction="row" spacing={2}>
115+
<Stack direction="row" spacing={1}>
108116
<IconButton
117+
size="small"
109118
onClick={() =>
110119
updateExistingConfig(
111120
catalogItem.name,
@@ -114,9 +123,13 @@ const ConfigEditor = ({
114123
}
115124
disabled={isSaving}
116125
>
117-
<CheckOutlined sx={{ color: 'success.main' }} />
126+
<CheckOutlined
127+
fontSize="small"
128+
sx={{ color: 'success.main' }}
129+
/>
118130
</IconButton>
119131
<IconButton
132+
size="small"
120133
onClick={() =>
121134
setLocalConfig({
122135
...localConfig,
@@ -125,11 +138,14 @@ const ConfigEditor = ({
125138
}
126139
disabled={isSaving}
127140
>
128-
<CloseOutlined sx={{ color: 'error.main' }} />
141+
<CloseOutlined
142+
fontSize="small"
143+
sx={{ color: 'error.main' }}
144+
/>
129145
</IconButton>
130146
</Stack>
131147
)}
132-
</Stack>
148+
</>
133149
)}
134150
</Stack>
135151
);

src/extension/ui/src/components/tile/Modal.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,9 @@ const ConfigurationModal = ({
358358
key={secret.name}
359359
direction="row"
360360
spacing={2}
361-
alignItems="center"
361+
sx={{
362+
alignItems: 'center',
363+
}}
362364
>
363365
<TextField
364366
size="small"
@@ -400,7 +402,7 @@ const ConfigurationModal = ({
400402
</IconButton>
401403
)}
402404
{secretEdited && (
403-
<ButtonGroup>
405+
<Stack direction="row" spacing={1}>
404406
<IconButton
405407
size="small"
406408
onClick={async () => {
@@ -432,7 +434,7 @@ const ConfigurationModal = ({
432434
sx={{ color: 'error.main' }}
433435
/>
434436
</IconButton>
435-
</ButtonGroup>
437+
</Stack>
436438
)}
437439
</Stack>
438440
);

0 commit comments

Comments
 (0)