1
1
import React from 'react' ;
2
- import { FormGroup as Pf4FormGroup , TextContent , Text , TextVariants } from '@patternfly/react-core' ;
2
+ import { FormGroup , TextContent , Text } from '@patternfly/react-core' ;
3
3
import PropTypes from 'prop-types' ;
4
4
5
- const FormGroup = ( { label, isRequired, helperText, meta, description, hideLabel, children, id } ) => {
5
+ const Pf4FormGroup = ( { label, isRequired, helperText, meta, description, hideLabel, children, id } ) => {
6
6
const { error, touched } = meta ;
7
7
const showError = touched && error ;
8
8
return (
9
- < Pf4FormGroup
9
+ < FormGroup
10
10
isRequired = { isRequired }
11
11
label = { ! hideLabel && label }
12
12
fieldId = { id }
@@ -16,15 +16,15 @@ const FormGroup = ({ label, isRequired, helperText, meta, description, hideLabel
16
16
>
17
17
{ description && (
18
18
< TextContent >
19
- < Text component = { TextVariants . small } > { description } </ Text >
19
+ < Text component = " small" > { description } </ Text >
20
20
</ TextContent >
21
21
) }
22
22
{ children }
23
- </ Pf4FormGroup >
23
+ </ FormGroup >
24
24
) ;
25
25
} ;
26
26
27
- FormGroup . propTypes = {
27
+ Pf4FormGroup . propTypes = {
28
28
label : PropTypes . string ,
29
29
isRequired : PropTypes . bool ,
30
30
helperText : PropTypes . string ,
@@ -35,9 +35,9 @@ FormGroup.propTypes = {
35
35
children : PropTypes . oneOfType ( [ PropTypes . element , PropTypes . arrayOf ( PropTypes . element ) ] ) . isRequired
36
36
} ;
37
37
38
- FormGroup . defaultProps = {
38
+ Pf4FormGroup . defaultProps = {
39
39
isRequired : false ,
40
40
description : undefined
41
41
} ;
42
42
43
- export default FormGroup ;
43
+ export default Pf4FormGroup ;
0 commit comments