Skip to content

Commit d4d5448

Browse files
authored
feat: Move FormGroup to forms (#769)
* moved formGroup out of inputgroup * move snapshot tests * changed index export and story import for formgroup * fix imports * added formgroup to the examples
1 parent 0c8e41d commit d4d5448

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed
File renamed without changes.
File renamed without changes.

src/Forms/Forms.Component.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'path';
22
import React from 'react';
3-
import { Checkbox, FormFieldset, FormInput, FormItem, FormLabel, FormLegend, FormMessage, FormRadioGroup, FormRadioItem, FormSelect, FormSet, FormTextarea, InlineHelp } from '../';
3+
import { Checkbox, FormFieldset, FormGroup, FormInput, FormItem, FormLabel, FormLegend, FormMessage, FormRadioGroup, FormRadioItem, FormSelect, FormSet, FormTextarea, InlineHelp } from '../';
44
import { ComponentPage, Example } from '../_playground';
55

66
export const FormsComponent = () => {
@@ -16,42 +16,42 @@ export const FormsComponent = () => {
1616
and noted by an asterisk (*).`}
1717
title='Inputs'>
1818
<div>
19-
<FormSet>
19+
<FormGroup>
2020
<FormItem>
2121
<FormLabel htmlFor='input-1'>Default Input</FormLabel>
2222
<FormInput id='input-1' placeholder='Field placeholder text'
2323
type='text' />
2424
</FormItem>
25-
</FormSet>
25+
</FormGroup>
2626

27-
<FormSet>
27+
<FormGroup>
2828
<FormItem>
2929
<FormLabel htmlFor='input-2' required>
3030
Required Input
3131
</FormLabel>
3232
<FormInput id='input-2' placeholder='Field placeholder text'
3333
type='text' />
3434
</FormItem>
35-
</FormSet>
35+
</FormGroup>
3636

37-
<FormSet>
37+
<FormGroup>
3838
<FormItem>
3939
<FormLabel htmlFor='input-3' required>
4040
Password
4141
</FormLabel>
4242
<FormInput id='input-3' placeholder='Field placeholder text'
4343
type='password' />
4444
</FormItem>
45-
</FormSet>
45+
</FormGroup>
4646

47-
<FormSet>
47+
<FormGroup>
4848
<FormItem>
4949
<FormLabel htmlFor='textarea-1' required>
5050
Text area
5151
</FormLabel>
5252
<FormTextarea defaultValue=' Pellentesque metus lacus commodo eget justo ut rutrum varius nunc.' id='textarea-1' />
5353
</FormItem>
54-
</FormSet>
54+
</FormGroup>
5555
</div>
5656
</Example>
5757

src/InputGroup/__stories__/FormGroup.stories.js renamed to src/Forms/__stories__/FormGroup.stories.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import FormGroup from '../FormGroup';
2-
import FormItem from '../../Forms/FormItem';
3-
import FormLabel from '../../Forms/FormLabel';
4-
import InputGroup from '../InputGroup';
2+
import FormItem from '../FormItem';
3+
import FormLabel from '../FormLabel';
4+
import InputGroup from '../../InputGroup/InputGroup';
55
import React from 'react';
66
import { storiesOf } from '@storybook/react';
77
import {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export { default as Calendar } from './Calendar/Calendar';
1212
export { default as ComboboxInput } from './ComboboxInput/ComboboxInput';
1313
export { default as DatePicker } from './DatePicker/DatePicker';
1414
export { default as Dropdown } from './Dropdown/Dropdown';
15+
export { default as FormGroup } from './Forms/FormGroup';
1516
export { default as FormSet } from './Forms/FormSet';
1617
export { default as FormItem } from './Forms/FormItem';
1718
export { default as FormLabel } from './Forms/FormLabel';
@@ -28,7 +29,6 @@ export { default as Identifier } from './Identifier/Identifier';
2829
export { default as Image } from './Image/Image';
2930
export { default as InlineHelp } from './InlineHelp/InlineHelp';
3031
export { default as InputGroup } from './InputGroup/InputGroup';
31-
export { default as FormGroup } from './InputGroup/FormGroup';
3232
export { default as Link } from './Link/Link';
3333
export { default as ListGroup } from './ListGroup/ListGroup';
3434
export { default as LocalizationEditor } from './LocalizationEditor/LocalizationEditor';

0 commit comments

Comments
 (0)