From 5d13cc220d4e8b3fed57eedbe0872028f9a0af41 Mon Sep 17 00:00:00 2001 From: Sander Siim Date: Wed, 20 Mar 2019 16:14:47 +0200 Subject: [PATCH] Add FullscreenControl component type definition added in react-map-gl 4.1 --- types/react-map-gl/index.d.ts | 10 +++++++++- types/react-map-gl/react-map-gl-tests.tsx | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/types/react-map-gl/index.d.ts b/types/react-map-gl/index.d.ts index 04c4d9aed9..23b723a594 100644 --- a/types/react-map-gl/index.d.ts +++ b/types/react-map-gl/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for react-map-gl 4.0 +// Type definitions for react-map-gl 4.1 // Project: https://github.com/uber/react-map-gl#readme // Definitions by: Robert Imig // Fabio Berta +// Sander Siim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 @@ -309,6 +310,13 @@ export interface NavigationControlProps extends BaseControlProps { export class NavigationControl extends BaseControl {} +export interface FullscreenControlProps extends BaseControlProps { + className?: string; + container?: HTMLElement | null; +} + +export class FullscreenControl extends BaseControl {} + export interface DraggableControlProps extends BaseControlProps { draggable?: boolean; onDrag?: (event: DragEvent) => void; diff --git a/types/react-map-gl/react-map-gl-tests.tsx b/types/react-map-gl/react-map-gl-tests.tsx index c9024287c9..6740ad0eb4 100644 --- a/types/react-map-gl/react-map-gl-tests.tsx +++ b/types/react-map-gl/react-map-gl-tests.tsx @@ -5,6 +5,7 @@ import { CanvasOverlay, SVGOverlay, HTMLOverlay, + FullscreenControl, CanvasRedrawOptions, HTMLRedrawOptions, SVGRedrawOptions, @@ -37,6 +38,7 @@ class MyMap extends React.Component<{}, State> { width={400} ref={this.setRefInteractive} > + { const {