Skip to content

Commit f7f81bc

Browse files
b-szypelowsheetalkamat
authored andcommitted
Reactstrap: Introduce typings for v5.0 (#20696)
* reactstrap: Create v4 subfolder * reactstrap@5: change getRef to innerRef
1 parent ceda0b6 commit f7f81bc

82 files changed

Lines changed: 4687 additions & 7 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

types/reactstrap/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for reactstrap 4.6
1+
// Type definitions for reactstrap 5.0
22
// Project: https://github.com/reactstrap/reactstrap#readme
33
// Definitions by: Ali Hammad Baig <https://github.com/alihammad>, Marco Falkenberg <https://github.com/mfal>, Danilo Barros <https://github.com/danilobjr>, Fábio Paiva <https://github.com/fabiopaiva>
44
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

types/reactstrap/lib/Button.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface Props extends React.HTMLProps<HTMLButtonElement> {
77
color?: string;
88
disabled?: boolean;
99
tag?: React.ReactType;
10-
getRef?: string | ((instance: HTMLButtonElement) => any);
10+
innerRef?: string | ((instance: HTMLButtonElement) => any);
1111

1212
onClick?: React.MouseEventHandler<any>;
1313
size?: any;

types/reactstrap/lib/CardLink.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CSSModule } from '../index';
22

33
interface Props {
44
tag?: React.ReactType;
5-
getRef?: string | ((instance: HTMLButtonElement) => any);
5+
innerRef?: string | ((instance: HTMLButtonElement) => any);
66
className?: string;
77
cssModule?: CSSModule;
88
href?: string;

types/reactstrap/lib/Form.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CSSModule } from '../index';
33
interface Props extends React.HTMLProps<HTMLFormElement> {
44
inline?: boolean;
55
tag?: React.ReactType;
6-
getRef?: string | ((instance: HTMLButtonElement) => any);
6+
innerRef?: string | ((instance: HTMLButtonElement) => any);
77
className?: string;
88
cssModule?: CSSModule;
99
}

types/reactstrap/lib/Input.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ interface InputProps extends Intermediate {
3939
state?: string;
4040
valid?: boolean;
4141
tag?: React.ReactType;
42-
getRef?: string | ((instance: HTMLInputElement) => any);
42+
innerRef?: string | ((instance: HTMLInputElement) => any);
4343
static?: boolean;
4444
addon?: boolean;
4545
className?: string;

types/reactstrap/lib/NavLink.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CSSModule } from '../index';
22

33
interface Props extends React.HTMLProps<HTMLAnchorElement> {
44
tag?: React.ReactType;
5-
getRef?: string | ((instance: HTMLButtonElement) => any);
5+
innerRef?: string | ((instance: HTMLButtonElement) => any);
66
disabled?: boolean;
77
active?: boolean;
88
className?: string;

types/reactstrap/reactstrap-tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3302,7 +3302,7 @@ class Example107 extends React.Component {
33023302
private input: HTMLInputElement;
33033303

33043304
render() {
3305-
return <Input type="file" getRef={(input) => { this.input = input; }} />;
3305+
return <Input type="file" innerRef={(input) => { this.input = input; }} />;
33063306
}
33073307
}
33083308

types/reactstrap/v4/index.d.ts

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Type definitions for reactstrap 4.6
2+
// Project: https://github.com/reactstrap/reactstrap#readme
3+
// Definitions by: Ali Hammad Baig <https://github.com/alihammad>, Marco Falkenberg <https://github.com/mfal>, Danilo Barros <https://github.com/danilobjr>, Fábio Paiva <https://github.com/fabiopaiva>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
// TypeScript Version: 2.3
6+
7+
export interface CSSModule {
8+
[className: string]: string;
9+
}
10+
11+
export { default as Alert } from './lib/Alert';
12+
export { default as Badge } from './lib/Badge';
13+
export { default as Breadcrumb } from './lib/Breadcrumb';
14+
export { default as BreadcrumbItem } from './lib/BreadcrumbItem';
15+
export { default as Button } from './lib/Button';
16+
export { default as ButtonDropdown } from './lib/ButtonDropdown';
17+
export { default as ButtonGroup } from './lib/ButtonGroup';
18+
export { default as ButtonToolbar } from './lib/ButtonToolbar';
19+
export { default as Card } from './lib/Card';
20+
export { default as CardBody } from './lib/CardBody';
21+
export { default as CardBlock } from './lib/CardBlock';
22+
export { default as CardColumns } from './lib/CardColumns';
23+
export { default as CardDeck } from './lib/CardDeck';
24+
export { default as CardFooter } from './lib/CardFooter';
25+
export { default as CardGroup } from './lib/CardGroup';
26+
export { default as CardHeader } from './lib/CardHeader';
27+
export { default as CardImg } from './lib/CardImg';
28+
export { default as CardImgOverlay } from './lib/CardImgOverlay';
29+
export { default as CardLink } from './lib/CardLink';
30+
export { default as CardSubtitle } from './lib/CardSubtitle';
31+
export { default as CardText } from './lib/CardText';
32+
export { default as CardTitle } from './lib/CardTitle';
33+
export { default as Col } from './lib/Col';
34+
export { default as Collapse } from './lib/Collapse';
35+
export { default as Container } from './lib/Container';
36+
export { default as Dropdown } from './lib/Dropdown';
37+
export { default as DropdownItem } from './lib/DropdownItem';
38+
export { default as DropdownMenu } from './lib/DropdownMenu';
39+
export { default as DropdownToggle } from './lib/DropdownToggle';
40+
export { default as Fade } from './lib/Fade';
41+
export { default as Form } from './lib/Form';
42+
export { default as FormFeedback } from './lib/FormFeedback';
43+
export { default as FormGroup } from './lib/FormGroup';
44+
export { default as FormText } from './lib/FormText';
45+
export { default as Input } from './lib/Input';
46+
export { default as InputGroup } from './lib/InputGroup';
47+
export { default as InputGroupAddon } from './lib/InputGroupAddon';
48+
export { default as InputGroupButton } from './lib/InputGroupButton';
49+
export { default as Jumbotron } from './lib/Jumbotron';
50+
export { default as Label } from './lib/Label';
51+
export { default as ListGroup } from './lib/ListGroup';
52+
export { default as ListGroupItem } from './lib/ListGroupItem';
53+
export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading';
54+
export { default as ListGroupItemText } from './lib/ListGroupItemText';
55+
export { default as Media } from './lib/Media';
56+
export { default as Modal } from './lib/Modal';
57+
export { default as ModalBody } from './lib/ModalBody';
58+
export { default as ModalFooter } from './lib/ModalFooter';
59+
export { default as ModalHeader } from './lib/ModalHeader';
60+
export { default as Nav } from './lib/Nav';
61+
export { default as Navbar } from './lib/Navbar';
62+
export { default as NavbarBrand } from './lib/NavbarBrand';
63+
export { default as NavbarToggler } from './lib/NavbarToggler';
64+
export { default as NavDropdown } from './lib/NavDropdown';
65+
export { default as NavItem } from './lib/NavItem';
66+
export { default as NavLink } from './lib/NavLink';
67+
export { default as Pagination } from './lib/Pagination';
68+
export { default as PaginationItem } from './lib/PaginationItem';
69+
export { default as PaginationLink } from './lib/PaginationLink';
70+
export { default as Popover } from './lib/Popover';
71+
export { default as PopoverContent } from './lib/PopoverContent';
72+
export { default as PopoverTitle } from './lib/PopoverTitle';
73+
export { default as Progress } from './lib/Progress';
74+
export { default as Row } from './lib/Row';
75+
export { default as TabContent } from './lib/TabContent';
76+
export { default as Table } from './lib/Table';
77+
export { default as TabPane } from './lib/TabPane';
78+
export { default as Tag } from './lib/Tag';
79+
export { default as TetherContent } from './lib/TetherContent';
80+
export { default as Tooltip } from './lib/Tooltip';
81+
export {
82+
UncontrolledAlert,
83+
UncontrolledButtonDropdown,
84+
UncontrolledDropdown,
85+
UncontrolledNavDropdown,
86+
UncontrolledTooltip
87+
} from './lib/Uncontrolled';

types/reactstrap/v4/lib/Alert.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CSSModule } from '../index';
2+
3+
export interface UncontrolledProps {
4+
className?: string;
5+
cssModule?: CSSModule;
6+
color?: string;
7+
tag?: React.ReactType;
8+
transitionAppearTimeout?: number;
9+
transitionEnterTimeout?: number;
10+
transitionLeaveTimeout?: number;
11+
}
12+
13+
interface Props extends UncontrolledProps {
14+
isOpen?: boolean;
15+
toggle?: () => void;
16+
}
17+
18+
declare var Alert: React.StatelessComponent<Props>;
19+
export default Alert;

types/reactstrap/v4/lib/Badge.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { CSSModule } from '../index';
2+
3+
interface Props {
4+
color?: string;
5+
pill?: boolean;
6+
tag?: React.ReactType;
7+
className?: string;
8+
cssModule?: CSSModule;
9+
}
10+
11+
declare var Badge: React.StatelessComponent<Props>;
12+
export default Badge;

0 commit comments

Comments
 (0)