Skip to content

Commit

Permalink
Fix inline radio group after PF4 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitkrai03 committed Jul 14, 2020
1 parent 83648d5 commit b85c7e7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Expand Up @@ -13,7 +13,7 @@
display: flex;
align-items: flex-start;

> .pf-c-form__label, .pf-c-radio {
> .pf-c-form__group-label {
margin-right: var(--pf-global--spacer--md);
}

Expand Down
Expand Up @@ -12,7 +12,7 @@ const RadioGroupField: React.FC<RadioGroupFieldProps> = ({
options,
helpText,
required,
inline,
isInline,
onChange,
...props
}) => {
Expand All @@ -22,13 +22,14 @@ const RadioGroupField: React.FC<RadioGroupFieldProps> = ({
const errorMessage = !isValid ? error : '';
return (
<FormGroup
className={classNames('ocs-radio-group-field', { 'ocs-radio-group-field--inline': inline })}
className={classNames('ocs-radio-group-field', { 'ocs-radio-group-field--inline': isInline })}
fieldId={fieldId}
helperText={helpText}
helperTextInvalid={errorMessage}
validated={isValid ? 'default' : 'error'}
isRequired={required}
label={label}
isInline={isInline}
>
{options.map((option) => {
const activeChild = field.value === option.value && option.activeChildren;
Expand Down
Expand Up @@ -99,7 +99,7 @@ const SyncedEditorField: React.FC<SyncedEditorFieldProps> = ({
},
]}
onChange={(val) => onChangeType(val as EditorType)}
inline
isInline
/>
</div>
{yamlWarning && (
Expand Down
Expand Up @@ -42,7 +42,7 @@ describe('DropdownField', () => {
wrapper
.find(RadioGroupField)
.first()
.props().inline,
.props().isInline,
).toBe(true);
});

Expand Down
Expand Up @@ -119,7 +119,7 @@ export interface RadioButtonFieldProps extends FieldProps {
}

export interface RadioGroupFieldProps extends FieldProps {
inline?: boolean;
isInline?: boolean;
options: RadioGroupOption[];
onChange?: (value: React.ReactText) => void;
}
Expand Down

0 comments on commit b85c7e7

Please sign in to comment.