Skip to content

Commit 26a393a

Browse files
committed
fix linebreak in labels
refs CMK-12676
1 parent ec626c8 commit 26a393a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ui/components.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import {
2424
TagValue,
2525
} from '../RequestSpec';
2626

27+
const LABEL_WIDTH = 16;
28+
2729
interface CommonProps<T> {
2830
label?: string;
2931
requestSpecKey?: string;
@@ -141,7 +143,7 @@ export const CheckMkSelect = <Key extends RequestSpecStringKeys>(props: CheckMkS
141143
const { autocompleter, value, onChange, label } = props;
142144

143145
return (
144-
<InlineField labelWidth={14} label={props.label}>
146+
<InlineField labelWidth={LABEL_WIDTH} label={props.label}>
145147
<CheckMkAsyncSelect
146148
inputId={`input_${props.label}`}
147149
label={label}
@@ -191,7 +193,7 @@ export const CheckMkSelectNegatable = <T extends RequestSpecNegatableOptionKeys>
191193

192194
return (
193195
<HorizontalGroup>
194-
<InlineField label={label} labelWidth={14}>
196+
<InlineField label={label} labelWidth={LABEL_WIDTH}>
195197
<CheckMkAsyncSelect
196198
inputId={`input_${props.label}`}
197199
label={label}
@@ -242,7 +244,7 @@ export const Filter = <T extends RequestSpecNegatableOptionKeys>(props: FilterPr
242244

243245
return (
244246
<HorizontalGroup>
245-
<InlineField label={label} labelWidth={14}>
247+
<InlineField label={label} labelWidth={LABEL_WIDTH}>
246248
<Input
247249
width={32}
248250
type="text"
@@ -371,7 +373,7 @@ export const HostLabelFilter: React.FC<HostLabelProps> = (props) => {
371373
};
372374

373375
return (
374-
<InlineField label={label} labelWidth={14}>
376+
<InlineField label={label} labelWidth={LABEL_WIDTH}>
375377
<AsyncMultiSelect
376378
width={32}
377379
defaultOptions

0 commit comments

Comments
 (0)