diff --git a/packages/patternfly-4/react-core/src/components/Form/Form.docs.js b/packages/patternfly-4/react-core/src/components/Form/Form.docs.js index 723f69ad8f4..67872bd6963 100644 --- a/packages/patternfly-4/react-core/src/components/Form/Form.docs.js +++ b/packages/patternfly-4/react-core/src/components/Form/Form.docs.js @@ -1,6 +1,5 @@ import Simple from './examples/SimpleForm'; import Horizontal from './examples/HorizontalForm'; -import Various from './examples/VariousLabelsForm'; import Invalid from './examples/InvalidForm'; import { Form, FormGroup, ActionGroup } from '@patternfly/react-core'; @@ -14,11 +13,6 @@ export default { examples: [ { component: Simple, title: 'Simple Form' }, { component: Horizontal, title: 'Horizontal form' }, - { component: Invalid, title: 'Invalid form' }, - { - component: Various, - title: 'Various labels and helper text', - description: 'Label and helperText can be a string, a function or a node.' - } + { component: Invalid, title: 'Invalid form' } ] }; diff --git a/packages/patternfly-4/react-core/src/components/Form/examples/InvalidForm.js b/packages/patternfly-4/react-core/src/components/Form/examples/InvalidForm.js index 8417906c6a2..2d873e5309c 100644 --- a/packages/patternfly-4/react-core/src/components/Form/examples/InvalidForm.js +++ b/packages/patternfly-4/react-core/src/components/Form/examples/InvalidForm.js @@ -2,28 +2,35 @@ import React from 'react'; import { Form, FormGroup, TextInput } from '@patternfly/react-core'; class InvalidForm extends React.Component { + state = { + value: 'Five', + isValid: false + }; + + handleTextInputChange = value => { + this.setState({ value, isValid: /^\d+$/.test(value) }); + }; + render() { + const { value, isValid } = this.state; + return (
); diff --git a/packages/patternfly-4/react-core/src/components/Form/examples/SimpleForm.js b/packages/patternfly-4/react-core/src/components/Form/examples/SimpleForm.js index dfa535a4868..1a642179117 100644 --- a/packages/patternfly-4/react-core/src/components/Form/examples/SimpleForm.js +++ b/packages/patternfly-4/react-core/src/components/Form/examples/SimpleForm.js @@ -82,6 +82,9 @@ class SimpleForm extends React.Component { aria-label="Please don't contact me" /> +