Skip to content

Commit 0905791

Browse files
committed
fix: label styling for container repo
1 parent 603d224 commit 0905791

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/components/ciConfig/CIContainerRegistryConfig.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export default function CIContainerRegistryConfig({
5353
isTemplateView,
5454
}: CIContainerRegistryConfigProps) {
5555
const [selectedRegistry, setSelectedRegistry] = useState(currentRegistry)
56+
const containerRegistryLabel = `Container Repository ${selectedRegistry && REGISTRY_TYPE_MAP[selectedRegistry.registryType]?.desiredFormat}`
5657

5758
const getCustomRegistryOption = (registry) => ({
5859
...registry,
@@ -160,7 +161,7 @@ export default function CIContainerRegistryConfig({
160161
linkProps: {
161162
to: URLS.GLOBAL_CONFIG_DOCKER,
162163
},
163-
startIcon: <Icon name="ic-add" color={null} />
164+
startIcon: <Icon name="ic-add" color={null} />,
164165
},
165166
}
166167
}
@@ -171,12 +172,13 @@ export default function CIContainerRegistryConfig({
171172
{registry.error && <label className="form__error">{registry.error}</label>}
172173
</div>
173174
<div className={`form__field flex-grow-1 ${configOverrideView ? 'mb-0-imp' : ''}`}>
174-
<label htmlFor="" className="form__label">
175-
Container Repository&nbsp;
176-
{selectedRegistry && REGISTRY_TYPE_MAP[selectedRegistry.registryType]?.desiredFormat}
177-
</label>
178175
{configOverrideView && !allowOverride ? (
179-
<span className="fs-14 fw-4 lh-20 cn-9">{ciConfig?.dockerRepository}</span>
176+
<>
177+
<label htmlFor="" className="form__label dc__truncate">
178+
{containerRegistryLabel}
179+
</label>
180+
<span className="fs-14 fw-4 lh-20 cn-9">{ciConfig?.dockerRepository}</span>
181+
</>
180182
) : (
181183
<CustomInput
182184
placeholder={
@@ -195,6 +197,7 @@ export default function CIContainerRegistryConfig({
195197
disabled={configOverrideView && !allowOverride}
196198
data-testid="container-repository-textbox"
197199
error={repository_name.error}
200+
label={containerRegistryLabel}
198201
/>
199202
)}
200203
{!ciConfig && selectedRegistry?.registryType === 'ecr' && (

0 commit comments

Comments
 (0)