diff --git a/types/react-leaflet-sidebarv2/index.d.ts b/types/react-leaflet-sidebarv2/index.d.ts index 726ec3e18a..2ce7767cf4 100644 --- a/types/react-leaflet-sidebarv2/index.d.ts +++ b/types/react-leaflet-sidebarv2/index.d.ts @@ -4,38 +4,38 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import React from 'react'; +import * as React from 'react'; type Icon = string | React.ElementType; type Anchor = 'top' | 'bottom'; type Position = 'left' | 'right'; interface TabProps{ - id: string, - header: string, - icon:Icon, - anchor?: Anchor, - disabled?: boolean, - onClose?: () => void, - closeIcon?: Icon, - position?: Position, + id: string; + header: string; + icon:Icon; + anchor?: Anchor; + disabled?: boolean; + onClose?: () => void; + closeIcon?: Icon; + position?: Position; active?: boolean -} -declare class Tab extends React.Component{} +}; +declare class Tab extends React.Component{}; -type TabType = React.Element | React.Element[] +type TabType = React.Element | Array>; interface SidebarProps { - id: string, - collapsed: boolean, - position: Position, - selected: string, - closeIcon?: Icon, - onClose?:() => void, - onOpen?: () => void, + id: string; + collapsed: boolean; + position: Position; + selected: string; + closeIcon?: Icon; + onClose?:() => void; + onOpen?: () => void; children: TabType -} +}; -declare class Sidebar extends React.Component{} +declare class Sidebar extends React.Component{}; -export {Tab, Sidebar} \ No newline at end of file +export {Tab, Sidebar}; \ No newline at end of file diff --git a/types/react-leaflet-sidebarv2/react-leaflet-sidebarv2-tests.tsx b/types/react-leaflet-sidebarv2/react-leaflet-sidebarv2-tests.tsx index 9eedfa1585..6687ba2ac9 100644 --- a/types/react-leaflet-sidebarv2/react-leaflet-sidebarv2-tests.tsx +++ b/types/react-leaflet-sidebarv2/react-leaflet-sidebarv2-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {Sidebar, Tab} from 'react-leaflet-sidebarv2'; +import { Sidebar, Tab } from 'react-leaflet-sidebarv2'; const MySidebar = (