mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
icon and onOpen types does not correct (#41439)
* icon and onOpen types does not correct Icon props in react-leaflet-sidebarv2 check for string or object so icon type must be ReactElement. onOpen handler must take an id to set selected state. * Update index.d.ts
This commit is contained in:
committed by
Eli Barzilay
parent
2d96caaff6
commit
72fa663add
4
types/react-leaflet-sidebarv2/index.d.ts
vendored
4
types/react-leaflet-sidebarv2/index.d.ts
vendored
@@ -6,7 +6,7 @@
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
type Icon = string | React.ElementType;
|
||||
type Icon = string | React.ReactElement;
|
||||
type Anchor = 'top' | 'bottom';
|
||||
type Position = 'left' | 'right';
|
||||
|
||||
@@ -33,7 +33,7 @@ interface SidebarProps {
|
||||
selected: string;
|
||||
closeIcon?: Icon;
|
||||
onClose?: () => void;
|
||||
onOpen?: () => void;
|
||||
onOpen?: (id: string) => void;
|
||||
children: TabType;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user