Skip to content

Commit 2a6be6a

Browse files
author
Gene Hynson
authored
fix(sub): clientID layout (#6078)
1 parent 6c76823 commit 2a6be6a

File tree

3 files changed

+59
-33
lines changed

3 files changed

+59
-33
lines changed

src/writeData/subscriptions/components/BrokerDetails.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@
7373
color: $cf-grey-55;
7474
margin-bottom: $cf-space-m;
7575
}
76+
&__clientid-text {
77+
color: $cf-grey-55;
78+
margin-bottom: $cf-space-s;
79+
}
80+
&__clientid-textbox {
81+
margin-bottom: $cf-space-s !important;
82+
}
7683
&__creds {
7784
.cf-form--element {
7885
&:nth-last-of-type(1) {

src/writeData/subscriptions/components/BrokerForm.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
color: $cf-grey-55;
7979
margin-bottom: $cf-space-m;
8080
}
81+
&__clientid-text {
82+
color: $cf-grey-55;
83+
margin-bottom: $cf-space-s;
84+
}
85+
&__clientid-textbox {
86+
margin-bottom: $cf-space-s !important;
87+
}
8188
&__creds {
8289
.cf-form--element {
8390
&:nth-last-of-type(1) {

src/writeData/subscriptions/components/BrokerFormContent.tsx

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -311,41 +311,53 @@ const BrokerFormContent: FC<Props> = ({
311311
useCustomClientID &&
312312
handleValidation('Client ID', formContent.clientID)
313313
}
314-
helpText="We will generate a Client ID for you, but some providers require you use their Client ID. If your provider requires a specific Client ID, the connection will fail without it. Check your provider’s documentation to verify whether you need to use their Client ID."
315-
className="no-margin-bottom"
314+
className={`${className}-broker-form__clientid-textbox`}
316315
>
317316
{status => (
318-
<Input
319-
type={InputType.Text}
320-
placeholder={
321-
useCustomClientID
322-
? 'Enter a client id'
323-
: randomClientID.current
324-
}
325-
name="clientid"
326-
autoFocus={false}
327-
value={formContent.clientID}
328-
onChange={e => {
329-
updateForm({
330-
...formContent,
331-
clientID: e.target.value,
332-
})
333-
}}
334-
onBlur={() =>
335-
event(
336-
'completed form field',
337-
{formField: 'clientid', step: 'broker'},
338-
{feature: 'subscriptions'}
339-
)
340-
}
341-
status={
342-
edit && useCustomClientID
343-
? status
344-
: ComponentStatus.Disabled
345-
}
346-
testID={`${className}-broker-form--clientid`}
347-
maxLength={255}
348-
/>
317+
<>
318+
<Heading
319+
element={HeadingElement.H5}
320+
weight={FontWeight.Regular}
321+
className={`${className}-broker-form__clientid-text`}
322+
>
323+
We will generate a Client ID for you, but some providers
324+
require you use their Client ID. If your provider requires
325+
a specific Client ID, the connection will fail without it.
326+
Check your provider’s documentation to verify whether you
327+
need to use their Client ID.
328+
</Heading>
329+
<Input
330+
type={InputType.Text}
331+
placeholder={
332+
useCustomClientID
333+
? 'Enter a client id'
334+
: randomClientID.current
335+
}
336+
name="clientid"
337+
autoFocus={false}
338+
value={formContent.clientID}
339+
onChange={e => {
340+
updateForm({
341+
...formContent,
342+
clientID: e.target.value,
343+
})
344+
}}
345+
onBlur={() =>
346+
event(
347+
'completed form field',
348+
{formField: 'clientid', step: 'broker'},
349+
{feature: 'subscriptions'}
350+
)
351+
}
352+
status={
353+
edit && useCustomClientID
354+
? status
355+
: ComponentStatus.Disabled
356+
}
357+
testID={`${className}-broker-form--clientid`}
358+
maxLength={255}
359+
/>
360+
</>
349361
)}
350362
</Form.ValidationElement>
351363
<Toggle

0 commit comments

Comments
 (0)