Permalink
Please
sign in to comment.
Browse files
fix(types): add bootstrap sizes for Form.Label as column (#3731)
* fix #3481 - add bootstrap sizes for Form.Label as column * type FormLabelProps with type union * make eslint happy * add test case for Form.Label with column prop
- Loading branch information
Showing
with
21 additions
and 3 deletions.
- +12 −2 types/components/FormLabel.d.ts
- +9 −1 types/simple.test.tsx
@@ -1,14 +1,24 @@ | ||
import * as React from 'react'; | ||
|
||
import { BsPrefixComponent } from './helpers'; | ||
import { ColProps } from './Col'; | ||
|
||
export interface FormLabelProps { | ||
interface FormLabelBaseProps { | ||
htmlFor?: string; | ||
column?: boolean; | ||
innerRef?: React.LegacyRef<this>; | ||
srOnly?: boolean; | ||
} | ||
|
||
export interface FormLabelOwnProps extends FormLabelBaseProps { | ||
column?: false; | ||
} | ||
|
||
export interface FormLabelWithColProps extends FormLabelBaseProps, ColProps { | ||
column: true; | ||
} | ||
|
||
export type FormLabelProps = FormLabelWithColProps | FormLabelOwnProps | ||
|
||
declare class FormLabel extends BsPrefixComponent<'label', FormLabelProps> {} | ||
|
||
export default FormLabel; |
0 comments on commit
cdb7b6b