Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): add bootstrap sizes for Form.Label as column #3731

Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -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;
@@ -175,7 +175,7 @@ import {
<Form.Group controlId="exampleForm.ControlSelect2">
<Form.Label>Example multiple select</Form.Label>
<Form.Label column={false}>Example multiple select</Form.Label>
<Form.Control as="select">
@@ -188,6 +188,14 @@ import {
<Form.Label>Example textarea</Form.Label>
<Form.Control as="textarea" rows={3} />
<Form.Group as={Row} controlId="exampleForm.HorizontalControl">
<Form.Label column sm={2}>
<Col sm={10}>
<Form.Control type="text" placeholder="Hoizontal" />

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.