Update typing for reactstrap Row (#37697)

This commit is contained in:
Andrew Lee
2019-08-19 11:13:32 -07:00
committed by Sheetal Nandi
parent 189bd67495
commit b6cfc68f53
2 changed files with 35 additions and 1 deletions

View File

@@ -1,12 +1,15 @@
import * as React from 'react';
import { CSSModule } from '../index';
export interface RowProps extends React.HTMLProps<HTMLElement> {
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export interface RowProps extends Omit<React.HTMLProps<HTMLElement>, 'form'> {
[key: string]: any;
className?: string;
cssModule?: CSSModule;
tag?: React.ReactType;
noGutters?: boolean;
form?: boolean;
}
declare class Row<T = {[key: string]: any}> extends React.Component<RowProps> {}

View File

@@ -4532,3 +4532,34 @@ function Example127() {
</div>
);
}
function Example128() {
return (
<Form>
<Row form>
<Col md={6}>
<FormGroup>
<Label for="exampleEmail">Email</Label>
<Input
type="email"
name="email"
id="exampleEmail"
placeholder="with a placeholder"
/>
</FormGroup>
</Col>
<Col md={6}>
<FormGroup>
<Label for="examplePassword">Password</Label>
<Input
type="password"
name="password"
id="examplePassword"
placeholder="password placeholder"
/>
</FormGroup>
</Col>
</Row>
</Form>
);
}