mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Fixed types according to linting errors and updated to import all of react since it is type import
This commit is contained in:
44
types/react-leaflet-sidebarv2/index.d.ts
vendored
44
types/react-leaflet-sidebarv2/index.d.ts
vendored
@@ -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<TabProps, any>{}
|
||||
};
|
||||
declare class Tab extends React.Component<TabProps, any>{};
|
||||
|
||||
type TabType = React.Element<Tab> | React.Element<Tab>[]
|
||||
type TabType = React.Element<Tab> | Array<React.Element<Tab>>;
|
||||
|
||||
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<SidebarProps, any>{}
|
||||
declare class Sidebar extends React.Component<SidebarProps, any>{};
|
||||
|
||||
export {Tab, Sidebar}
|
||||
export {Tab, Sidebar};
|
||||
@@ -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 = (
|
||||
<Sidebar
|
||||
|
||||
Reference in New Issue
Block a user