From daadce7d43a8977042685c972ce05188e36adde8 Mon Sep 17 00:00:00 2001 From: Tom Duncalf Date: Thu, 3 Mar 2016 13:13:25 +0000 Subject: [PATCH] Change react-bootstrap definition to reflect that trigger attribute can also be an array of strings --- react-bootstrap/react-bootstrap-tests.tsx | 3 + react-bootstrap/react-bootstrap.d.ts | 80 +++++++++++------------ 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/react-bootstrap/react-bootstrap-tests.tsx b/react-bootstrap/react-bootstrap-tests.tsx index 64e899790..5b937ff29 100644 --- a/react-bootstrap/react-bootstrap-tests.tsx +++ b/react-bootstrap/react-bootstrap-tests.tsx @@ -375,6 +375,9 @@ export class ReactBootstrapTest extends Component { Holy guacamole! Check this info.}> + Holy guacamole! Check this info.}> + + Holy guacamole! Check this info.}> diff --git a/react-bootstrap/react-bootstrap.d.ts b/react-bootstrap/react-bootstrap.d.ts index a2215c729..f3cfd20f3 100644 --- a/react-bootstrap/react-bootstrap.d.ts +++ b/react-bootstrap/react-bootstrap.d.ts @@ -1,12 +1,12 @@ -// Type definitions for react-bootstrap +// Type definitions for react-bootstrap // Project: https://github.com/react-bootstrap/react-bootstrap // Definitions by: Walker Burgin , Vincent Siao // Definitions: https://github.com/borisyankov/DefinitelyTyped /// - + declare module "react-bootstrap" { - // Import React + // Import React import React = require("react"); @@ -25,7 +25,7 @@ declare module "react-bootstrap" { navDropdown?: boolean; componentClass?: string; href?: string; - onClick?: Function; // Add more specific type + onClick?: Function; // Add more specific type target?: string; type?: string; } @@ -66,15 +66,15 @@ declare module "react-bootstrap" { interface DropdownButtonProps extends React.Props { bsStyle?: string; bsSize?: string; - buttonClassName?: string; + buttonClassName?: string; className?: string; dropup?: boolean; href?: string; - id?: string | number; + id?: string | number; navItem?: boolean; noCaret?: boolean; - onClick?: Function; // TODO: Add more specifc type - onSelect?: Function; // TODO: Add more specific type + onClick?: Function; // TODO: Add more specifc type + onSelect?: Function; // TODO: Add more specific type pullRight?: boolean; title?: any; // TODO: Add more specific type } @@ -83,7 +83,7 @@ declare module "react-bootstrap" { // // ---------------------------------------- - interface SplitButtonProps extends React.Props{ + interface SplitButtonProps extends React.Props{ bsStyle?: string; bsSize?: string; className?: string; @@ -91,9 +91,9 @@ declare module "react-bootstrap" { dropdownTitle?: any; // TODO: Add more specific type dropup?: boolean; href?: string; - id?: string; - onClick?: Function; // TODO: Add more specific type - onSelect?: Function; // TODO: Add more specific type + id?: string; + onClick?: Function; // TODO: Add more specific type + onSelect?: Function; // TODO: Add more specific type pullRight?: boolean; target?: string; title?: any; // TODO: Add more specific type @@ -133,8 +133,8 @@ declare module "react-bootstrap" { footer?: any; // TODO: Add more specific type header?: any; // TODO: Add more specific type id?: string; - onSelect?: Function; // TODO: Add more specific type - onClick?: Function; // TODO: Add more specific type + onSelect?: Function; // TODO: Add more specific type + onClick?: Function; // TODO: Add more specific type } type Panel = React.ClassicComponent; var Panel: React.ClassicComponentClass; @@ -151,7 +151,7 @@ declare module "react-bootstrap" { footer?: any; // TODO: Add more specific type header?: any; // TODO: Add more specific type id?: string; - onSelect?: Function; // TODO: Add more specific type + onSelect?: Function; // TODO: Add more specific type } type Accordion = React.ClassicComponent; var Accordion: React.ClassicComponentClass; @@ -173,7 +173,7 @@ declare module "react-bootstrap" { // // ---------------------------------------- interface ModalDialogProps extends React.Props { - // TODO: Add more specific type + // TODO: Add more specific type } type ModalDialog = React.ClassicComponent; var ModalDialog: React.ClassicComponentClass; @@ -268,7 +268,7 @@ declare module "react-bootstrap" { onExiting?: Function; placement?: string; rootClose?: boolean; - trigger?: string; + trigger?: string | string[]; } type OverlayTrigger = React.ClassicComponent; var OverlayTrigger: React.ClassicComponentClass; @@ -282,7 +282,7 @@ declare module "react-bootstrap" { bsSize?: string; bsStyle?: string; className?: string; - id?: string; + id?: string; placement?: string; positionLeft?: number; positionTop?: number; @@ -300,7 +300,7 @@ declare module "react-bootstrap" { bsSize?: string; bsStyle?: string; className?: string; - id?: string; + id?: string; placement?: string; positionLeft?: number; positionTop?: number; @@ -352,7 +352,7 @@ declare module "react-bootstrap" { //