Skip to content

Commit

Permalink
fix(Input): rename inputHelpText prop to helpText
Browse files Browse the repository at this point in the history
BREAKING CHANGE: prop name change from inputHelpText to helpText
  • Loading branch information
bfbiggs committed Sep 18, 2019
1 parent b9057e3 commit c6a4b6f
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion react/src/lib/FormSection/examples/FormSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function FormSectionDefault() {
disabled
placeholder='Disabled Input'
onChange={() => {}}
inputHelpText='Field Must be Disabled'
helpText='Field Must be Disabled'
messageArr={[]}
/>
</FormSection>
Expand Down
2 changes: 1 addition & 1 deletion react/src/lib/FormSubSection/examples/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Default() {
disabled
placeholder="Disabled Input"
onChange={() => {}}
inputHelpText="Field Must be Disabled"
helpText="Field Must be Disabled"
messageArr={[]}
/>
</FormSubSection>
Expand Down
2 changes: 1 addition & 1 deletion react/src/lib/Input/examples/HelpText.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function InputHelpText() {
label='Help Text Input'
htmlId='inputHelpText'
containerSize='medium-6'
inputHelpText='This is help text for the input.'
helpText='This is help text for the input.'
placeholder='With Placeholder'
/>
);
Expand Down
10 changes: 5 additions & 5 deletions react/src/lib/Input/examples/KitchenSink.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export default class InputKitchenSink extends React.PureComponent {
htmlId={`help${value}`}
containerSize="small-12"
placeholder="With Placeholder"
inputHelpText="Help Text"
helpText="Help Text"
/>
<Input
name={`inputSecondaryLabel${value}`}
Expand All @@ -210,15 +210,15 @@ export default class InputKitchenSink extends React.PureComponent {
htmlId={`inputSecondaryHelpLabel${value}`}
containerSize="small-12"
secondaryLabel="Secondary Label"
inputHelpText="Help Text"
helpText="Help Text"
/>
<Input
name={`inputSecondaryHelpLabelDisabled${value}`}
label="Disabled Secondary/Help Label"
htmlId={`inputSecondaryHelpLabelDisabled${value}`}
containerSize="small-12"
secondaryLabel="Secondary Label"
inputHelpText="Help Text"
helpText="Help Text"
disabled
/>
<Input
Expand Down Expand Up @@ -308,7 +308,7 @@ export default class InputKitchenSink extends React.PureComponent {
isFilled
containerSize="small-12"
placeholder="With Placeholder"
inputHelpText="Help Text"
helpText="Help Text"
/>
<Input
name={`FillinputSecondaryLabel${value}`}
Expand All @@ -325,7 +325,7 @@ export default class InputKitchenSink extends React.PureComponent {
isFilled
containerSize="small-12"
secondaryLabel="Secondary Label"
inputHelpText="Help Text"
helpText="Help Text"
/>
<InputSearch
name={`defaultInputSearch${value}`}
Expand Down
4 changes: 2 additions & 2 deletions react/src/lib/Input/examples/Validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ export default class InputValidation extends React.PureComponent {
label='Advanced Validation'
htmlId='inputValidation'
containerSize='medium-6'
inputHelpText='Field Must contain at least 6 characters and 1 capital letter'
helpText='Field Must contain at least 6 characters and 1 capital letter'
messageArr={this.state.testMeError}
onChange={this.handleChange}
value={this.state.testMe}
/>
</form>
);
}
}
}
12 changes: 6 additions & 6 deletions react/src/lib/Input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Input extends React.Component {
htmlId,
id,
inputClassName,
inputHelpText,
helpText,
inputSize,
isFilled,
label,
Expand Down Expand Up @@ -194,7 +194,7 @@ class Input extends React.Component {

const inputElement = (
<div className={
'md-input__wrapper' +
'md-input__wrapper' +
`${inputSize ? ` columns ${inputSize}` : ''}`
}>
{inputLeft}
Expand Down Expand Up @@ -255,14 +255,14 @@ class Input extends React.Component {
}
{inputElement}
{
secondaryLabel &&
secondaryLabel &&
<Label
className='md-input__secondary-label'
htmlFor={htmlId}
label={secondaryLabel}
/>
}
{inputHelpText && <InputHelper message={inputHelpText} />}
{helpText && <InputHelper message={helpText} />}
{messages &&
<div className='md-input__messages'>
{messages.map((m, i) => (
Expand Down Expand Up @@ -305,7 +305,7 @@ Input.propTypes = {
/** @prop Input css class name string | '' */
inputClassName: PropTypes.string,
/** @prop Help Text to show form validation rules | '' */
inputHelpText: PropTypes.string,
helpText: PropTypes.string,
/*** @prop Optional Input ref prop type | null */
inputRef: PropTypes.func,
/** @prop Overall input wrapper size | '' */
Expand Down Expand Up @@ -359,7 +359,7 @@ Input.defaultProps = {
inputBefore: null,
id: null,
inputClassName: '',
inputHelpText: '',
helpText: '',
inputRef: null,
inputSize: '',
isFilled: false,
Expand Down
10 changes: 5 additions & 5 deletions react/src/lib/Input/tests/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ ShallowWrapper {
containerSize=""
defaultValue=""
disabled={false}
helpText=""
htmlId="1"
id={null}
inputAfter={null}
inputBefore={null}
inputClassName=""
inputHelpText=""
inputRef={null}
inputSize=""
isFilled={false}
Expand Down Expand Up @@ -323,12 +323,12 @@ ShallowWrapper {
containerSize=""
defaultValue=""
disabled={false}
helpText=""
htmlId="1"
id={null}
inputAfter={null}
inputBefore={null}
inputClassName=""
inputHelpText=""
inputRef={null}
inputSize=""
isFilled={false}
Expand Down Expand Up @@ -622,12 +622,12 @@ ShallowWrapper {
containerSize=""
defaultValue=""
disabled={false}
helpText=""
htmlId="1"
id={null}
inputAfter={null}
inputBefore={null}
inputClassName=""
inputHelpText=""
inputRef={null}
inputSize=""
isFilled={false}
Expand Down Expand Up @@ -921,12 +921,12 @@ ShallowWrapper {
containerSize=""
defaultValue=""
disabled={false}
helpText=""
htmlId="1"
id={null}
inputAfter={null}
inputBefore={null}
inputClassName=""
inputHelpText=""
inputRef={null}
inputSize=""
isFilled={false}
Expand Down Expand Up @@ -1220,12 +1220,12 @@ ShallowWrapper {
containerSize=""
defaultValue=""
disabled={false}
helpText=""
htmlId="1"
id={null}
inputAfter={null}
inputBefore={null}
inputClassName=""
inputHelpText=""
inputRef={null}
inputSize=""
isFilled={false}
Expand Down
2 changes: 1 addition & 1 deletion react/src/lib/Input/tests/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ describe('tests for <Input />', () => {

it('should render Helper Text', () => {
const container = shallow(
<Input htmlId="test123" name="test" label="test" inputHelpText="test" />
<Input htmlId="test123" name="test" label="test" helpText="test" />
);

expect(container.contains(<InputHelper message="test" />)).toEqual(true);
Expand Down
12 changes: 6 additions & 6 deletions react/src/lib/InputSearch/tests/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ShallowWrapper {
"containerSize": "",
"defaultValue": "",
"disabled": false,
"helpText": "",
"htmlId": null,
"id": "1",
"inputAfter": null,
Expand All @@ -42,7 +43,6 @@ ShallowWrapper {
size={20}
/>,
"inputClassName": "",
"inputHelpText": "",
"inputRef": null,
"inputSize": "",
"isFilled": false,
Expand Down Expand Up @@ -81,6 +81,7 @@ ShallowWrapper {
"containerSize": "",
"defaultValue": "",
"disabled": false,
"helpText": "",
"htmlId": null,
"id": "1",
"inputAfter": null,
Expand All @@ -93,7 +94,6 @@ ShallowWrapper {
size={20}
/>,
"inputClassName": "",
"inputHelpText": "",
"inputRef": null,
"inputSize": "",
"isFilled": false,
Expand Down Expand Up @@ -178,6 +178,7 @@ ShallowWrapper {
"containerSize": "",
"defaultValue": "",
"disabled": false,
"helpText": "",
"htmlId": null,
"id": "1",
"inputAfter": null,
Expand All @@ -199,7 +200,6 @@ ShallowWrapper {
type=""
/>,
"inputClassName": "",
"inputHelpText": "",
"inputRef": null,
"inputSize": "",
"isFilled": false,
Expand Down Expand Up @@ -238,6 +238,7 @@ ShallowWrapper {
"containerSize": "",
"defaultValue": "",
"disabled": false,
"helpText": "",
"htmlId": null,
"id": "1",
"inputAfter": null,
Expand All @@ -259,7 +260,6 @@ ShallowWrapper {
type=""
/>,
"inputClassName": "",
"inputHelpText": "",
"inputRef": null,
"inputSize": "",
"isFilled": false,
Expand Down Expand Up @@ -345,6 +345,7 @@ ShallowWrapper {
"containerSize": "",
"defaultValue": "",
"disabled": false,
"helpText": "",
"htmlId": null,
"id": "1",
"inputAfter": null,
Expand All @@ -366,7 +367,6 @@ ShallowWrapper {
type=""
/>,
"inputClassName": "",
"inputHelpText": "",
"inputRef": null,
"inputSize": "",
"isFilled": false,
Expand Down Expand Up @@ -405,6 +405,7 @@ ShallowWrapper {
"containerSize": "",
"defaultValue": "",
"disabled": false,
"helpText": "",
"htmlId": null,
"id": "1",
"inputAfter": null,
Expand All @@ -426,7 +427,6 @@ ShallowWrapper {
type=""
/>,
"inputClassName": "",
"inputHelpText": "",
"inputRef": null,
"inputSize": "",
"isFilled": false,
Expand Down
2 changes: 1 addition & 1 deletion react/src/lib/ModalBody/examples/Default.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function ModalBodyDefault() {
disabled
placeholder="Disabled Input"
onChange={() => {}}
inputHelpText="Field Must be Disabled"
helpText="Field Must be Disabled"
messageArr={[]}
/>
</ModalBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ ShallowWrapper {
containerSize=""
defaultValue=""
disabled={false}
helpText=""
htmlId={null}
id="md-timepicker__input-1"
inputAfter={null}
inputBefore={null}
inputClassName=""
inputHelpText=""
inputRef={[Function]}
inputSize=""
isFilled={false}
Expand Down Expand Up @@ -81,12 +81,12 @@ ShallowWrapper {
"containerSize": "",
"defaultValue": "",
"disabled": false,
"helpText": "",
"htmlId": null,
"id": "md-timepicker__input-1",
"inputAfter": null,
"inputBefore": null,
"inputClassName": "",
"inputHelpText": "",
"inputRef": [Function],
"inputSize": "",
"isFilled": false,
Expand Down Expand Up @@ -131,12 +131,12 @@ ShallowWrapper {
containerSize=""
defaultValue=""
disabled={false}
helpText=""
htmlId={null}
id="md-timepicker__input-1"
inputAfter={null}
inputBefore={null}
inputClassName=""
inputHelpText=""
inputRef={[Function]}
inputSize=""
isFilled={false}
Expand Down Expand Up @@ -176,12 +176,12 @@ ShallowWrapper {
"containerSize": "",
"defaultValue": "",
"disabled": false,
"helpText": "",
"htmlId": null,
"id": "md-timepicker__input-1",
"inputAfter": null,
"inputBefore": null,
"inputClassName": "",
"inputHelpText": "",
"inputRef": [Function],
"inputSize": "",
"isFilled": false,
Expand Down

0 comments on commit c6a4b6f

Please sign in to comment.