init
This commit is contained in:
57
types/react-simple-maps.d.ts
vendored
Normal file
57
types/react-simple-maps.d.ts
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
declare module "react-simple-maps" {
|
||||
import { ComponentType, ReactNode } from "react";
|
||||
|
||||
interface ComposableMapProps {
|
||||
projection?: string;
|
||||
projectionConfig?: {
|
||||
center?: [number, number];
|
||||
scale?: number;
|
||||
rotate?: [number, number, number];
|
||||
};
|
||||
width?: number;
|
||||
height?: number;
|
||||
style?: React.CSSProperties;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
interface GeographiesProps {
|
||||
geography: string | object;
|
||||
children: (data: {
|
||||
geographies: Geography[];
|
||||
}) => ReactNode;
|
||||
}
|
||||
|
||||
interface Geography {
|
||||
rsmKey: string;
|
||||
properties: Record<string, unknown>;
|
||||
}
|
||||
|
||||
interface GeographyProps {
|
||||
geography: Geography;
|
||||
key?: string;
|
||||
fill?: string;
|
||||
stroke?: string;
|
||||
strokeWidth?: number;
|
||||
style?: {
|
||||
default?: React.CSSProperties & { outline?: string };
|
||||
hover?: React.CSSProperties & { outline?: string };
|
||||
pressed?: React.CSSProperties & { outline?: string };
|
||||
};
|
||||
onClick?: () => void;
|
||||
onMouseEnter?: () => void;
|
||||
onMouseLeave?: () => void;
|
||||
}
|
||||
|
||||
interface ZoomableGroupProps {
|
||||
center?: [number, number];
|
||||
zoom?: number;
|
||||
minZoom?: number;
|
||||
maxZoom?: number;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const ComposableMap: ComponentType<ComposableMapProps>;
|
||||
export const Geographies: ComponentType<GeographiesProps>;
|
||||
export const Geography: ComponentType<GeographyProps>;
|
||||
export const ZoomableGroup: ComponentType<ZoomableGroupProps>;
|
||||
}
|
||||
Reference in New Issue
Block a user