From 402a9299d4763f75109fad9228e6263398433455 Mon Sep 17 00:00:00 2001 From: Duong Tran Date: Fri, 24 Aug 2018 17:45:02 +1000 Subject: [PATCH 1/2] update [NavDropdown] title defintion to accept ReactNode --- types/react-bootstrap/index.d.ts | 1 + types/react-bootstrap/lib/NavDropdown.d.ts | 4 +++- .../test/react-bootstrap-individual-components-tests.tsx | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/react-bootstrap/index.d.ts b/types/react-bootstrap/index.d.ts index 2427c5cbc6..83f5f8db61 100644 --- a/types/react-bootstrap/index.d.ts +++ b/types/react-bootstrap/index.d.ts @@ -13,6 +13,7 @@ // Aaron Beall // Johann Rakotoharisoa // Andrew Makarov +// Duong Tran // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 diff --git a/types/react-bootstrap/lib/NavDropdown.d.ts b/types/react-bootstrap/lib/NavDropdown.d.ts index 909f5dd67a..6f274fb3fc 100644 --- a/types/react-bootstrap/lib/NavDropdown.d.ts +++ b/types/react-bootstrap/lib/NavDropdown.d.ts @@ -1,4 +1,5 @@ import * as React from 'react'; +import { Omit } from 'react-bootstrap'; import { DropdownBaseProps } from './Dropdown'; declare namespace NavDropdown { @@ -6,9 +7,10 @@ declare namespace NavDropdown { active?: boolean; noCaret?: boolean; eventKey?: any; + title: React.ReactNode; } - export type NavDropdownProps = NavDropdownBaseProps & React.HTMLProps; + export type NavDropdownProps = NavDropdownBaseProps & Omit, 'title'>; } declare class NavDropdown extends React.Component { } export = NavDropdown; diff --git a/types/react-bootstrap/test/react-bootstrap-individual-components-tests.tsx b/types/react-bootstrap/test/react-bootstrap-individual-components-tests.tsx index 8c4237d22b..c478e931b2 100644 --- a/types/react-bootstrap/test/react-bootstrap-individual-components-tests.tsx +++ b/types/react-bootstrap/test/react-bootstrap-individual-components-tests.tsx @@ -166,7 +166,7 @@ export class ReactBootstrapIndividualComponentsTest extends React.Component {