Skip to content

Commit

Permalink
fix(types): types for FormLabel (#5063)
Browse files Browse the repository at this point in the history
* #5056 fix types for FormLabel

Fixes #5056 and adds 'sm' and 'lg' as types for FormLabel column

* Update simple.test.tsx

Updated with test for types on Form.Label column

Co-authored-by: Tor Raswill <tor.raswill@dqc.se>
  • Loading branch information
kosmiq and Tor Raswill authored Mar 24, 2020
1 parent fbbb886 commit 42bd5af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion types/components/FormLabel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface FormLabelOwnProps extends FormLabelBaseProps {
}

export interface FormLabelWithColProps extends FormLabelBaseProps, ColProps {
column: true;
column: true | 'sm' | 'lg';
}

export type FormLabelProps = FormLabelWithColProps | FormLabelOwnProps;
Expand Down
8 changes: 8 additions & 0 deletions types/simple.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,14 @@ import {
<Form.Control type="text" placeholder="Hoizontal" />
</Col>
</Form.Group>
<Form.Group as={Row} controlId="exampleForm.HorizontalControl">
<Form.Label column="sm" sm={2}>
Horizontal
</Form.Label>
<Col sm={10}>
<Form.Control type="text" placeholder="Hoizontal" />
</Col>
</Form.Group>
<Form.File id="custom-file" label="Custom file input" custom />
<Form.File
ref={React.createRef<HTMLInputElement & FormFile>()}
Expand Down

0 comments on commit 42bd5af

Please sign in to comment.