Merge pull request #32199 from bes/bssize-bsclass-bstyle

react-bootstrap: add missing bsClass, bsSize declarations
This commit is contained in:
Benjamin Lichtman
2019-01-29 09:36:32 -08:00
committed by GitHub
21 changed files with 43 additions and 4 deletions
+13
View File
@@ -0,0 +1,13 @@
# react-bootstrap
## Intended compatibilty
This library is intended for releases of react-bootstrap prior to `v1.0.0`, e.g. `v0.32.4`.
The reason is that react-bootstrap `v1.0.0` targets Bootstrap v4, and includes its own
typings. react-bootstrap prior to `v1.0.0` targets Bootstrap v3 and does not include any
typings.
It does not make sense for everyone to upgrade to Bootstrap v4, therefore these typings
are useful for everyone that wants to stay on Bootstrap v3 and react-bootstrap prior to `v1.0.0`.
The typings for `v1.0.0` were merged in [this pull request](https://github.com/react-bootstrap/react-bootstrap/commit/2079b2292afb835d036fcceef47e8938c4a8d86a).
+1
View File
@@ -14,6 +14,7 @@
// Johann Rakotoharisoa <https://github.com/jrakotoharisoa>
// Andrew Makarov <https://github.com/r3nya>
// Duong Tran <https://github.com/t49tran>
// Erik Zivkovic <https://github.com/bes>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
+1
View File
@@ -5,6 +5,7 @@ declare namespace Alert {
export interface AlertProps extends React.HTMLProps<Alert> {
bsSize?: Sizes;
bsStyle?: string;
bsClass?: string;
closeLabel?: string;
/** @deprecated since v0.29.0 */dismissAfter?: number;
// TODO: Add more specific type
+1
View File
@@ -6,6 +6,7 @@ declare namespace ButtonGroup {
block?: boolean;
bsSize?: Sizes;
bsStyle?: string;
bsClass?: string;
justified?: boolean;
vertical?: boolean;
}
+1
View File
@@ -6,6 +6,7 @@ declare namespace ButtonToolbar {
block?: boolean;
bsSize?: Sizes;
bsStyle?: string;
bsClass?: string;
justified?: boolean;
vertical?: boolean;
}
+1
View File
@@ -7,6 +7,7 @@ declare namespace Clearfix {
visibleSmBlock?: boolean;
visibleMdBlock?: boolean;
visibleLgBlock?: boolean;
bsClass?: string;
}
}
declare class Clearfix extends React.Component<Clearfix.ClearfixProps> { }
+3 -1
View File
@@ -1,7 +1,9 @@
import * as React from 'react';
declare namespace FormControlFeedback {
export type FormControlFeedbackProps = React.HTMLProps<FormControlFeedback>;
export interface FormControlFeedbackProps extends React.HTMLProps<FormControlFeedback> {
bsClass?: string;
}
}
declare class FormControlFeedback extends React.Component<FormControlFeedback.FormControlFeedbackProps> { }
export = FormControlFeedback;
+3 -1
View File
@@ -1,7 +1,9 @@
import * as React from 'react';
declare namespace InputGroupAddon {
type InputGroupAddonProps = React.HTMLProps<InputGroupAddon>;
interface InputGroupAddonProps extends React.HTMLProps<InputGroupAddon> {
bsClass?: string;
}
}
declare class InputGroupAddon extends React.Component<InputGroupAddon.InputGroupAddonProps> { }
export = InputGroupAddon;
+3 -1
View File
@@ -1,7 +1,9 @@
import * as React from 'react';
declare namespace InputGroupButton {
export type InputGroupButtonProps = React.HTMLProps<InputGroupButton>;
export interface InputGroupButtonProps extends React.HTMLProps<InputGroupButton> {
bsClass?: string;
}
}
declare class InputGroupButton extends React.Component<InputGroupButton.InputGroupButtonProps> { }
export = InputGroupButton;
+1
View File
@@ -19,6 +19,7 @@ declare namespace Modal {
backdropStyle?: any;
backdropTransitionTimeout?: number;
bsSize?: Sizes;
bsClass?: string;
container?: any; // TODO: Add more specific type
containerClassName?: string;
dialogClassName?: string;
+3
View File
@@ -1,4 +1,5 @@
import * as React from 'react';
import { Sizes } from 'react-bootstrap';
declare namespace ModalDialog {
export interface ModalDialogProps extends React.HTMLProps<ModalDialog> {
@@ -10,6 +11,8 @@ declare namespace ModalDialog {
onExit?: Function;
onExited?: Function;
onExiting?: Function;
bsSize?: Sizes;
bsClass?: string;
}
}
declare class ModalDialog extends React.Component<ModalDialog.ModalDialogProps> { }
+1
View File
@@ -3,6 +3,7 @@ import * as React from 'react';
declare namespace ModalFooter {
export interface ModalFooterProps extends React.HTMLProps<ModalFooter> {
componentClass?: React.ReactType;
bsClass?: string;
}
}
declare class ModalFooter extends React.Component<ModalFooter.ModalFooterProps> { }
+1
View File
@@ -3,6 +3,7 @@ import * as React from 'react';
declare namespace ModalTitle {
export interface ModalTitleProps extends React.HTMLProps<ModalTitle> {
componentClass?: React.ReactType;
bsClass?: string;
}
}
declare class ModalTitle extends React.Component<ModalTitle.ModalTitleProps> { }
+1
View File
@@ -8,6 +8,7 @@ declare namespace Nav {
activeKey?: any;
bsSize?: Sizes;
bsStyle?: string;
bsClass?: string;
collapsible?: boolean;
eventKey?: any;
expanded?: boolean;
+3 -1
View File
@@ -1,7 +1,9 @@
import * as React from 'react';
declare namespace PageHeader {
export type PageHeaderProps = React.HTMLProps<PageHeader>;
export interface PageHeaderProps extends React.HTMLProps<PageHeader> {
bsClass?: string;
}
}
declare class PageHeader extends React.Component<PageHeader.PageHeaderProps> { }
export = PageHeader;
+1
View File
@@ -5,6 +5,7 @@ import PagerItem = require('./PagerItem');
declare namespace Pager {
export interface PagerProps extends React.HTMLProps<Pager> {
onSelect?: SelectCallback;
bsClass?: string;
}
}
declare class Pager extends React.Component<Pager.PagerProps> {
+1
View File
@@ -8,6 +8,7 @@ declare namespace Popover {
arrowOffsetTop?: number | string;
bsSize?: Sizes;
bsStyle?: string;
bsClass?: string;
placement?: string;
positionLeft?: number | string; // String support added since v0.30.0
positionTop?: number | string; // String support added since v0.30.0
+1
View File
@@ -7,6 +7,7 @@ declare namespace ProgressBar {
active?: boolean;
bsSize?: Sizes;
bsStyle?: string;
bsClass?: string;
interpolatedClass?: any; // TODO: Add more specific type
max?: number;
min?: number;
+1
View File
@@ -6,6 +6,7 @@ declare namespace TabContent {
animation?: boolean | React.ReactType;
mountOnEnter?: boolean;
unmountOnExit?: boolean;
bsClass?: string;
}
}
declare class TabContent extends React.Component<TabContent.TabContentProps> { }
+1
View File
@@ -8,6 +8,7 @@ declare namespace Tooltip {
arrowOffsetTop?: number | string;
bsSize?: Sizes;
bsStyle?: string;
bsClass?: string;
placement?: string;
positionLeft?: number;
positionTop?: number;
+1
View File
@@ -5,6 +5,7 @@ declare namespace Well {
export interface WellProps extends React.HTMLProps<Well> {
bsSize?: Sizes;
bsStyle?: string;
bsClass?: string;
}
}
declare class Well extends React.Component<Well.WellProps> { }