Skip to content

Commit cc39ed0

Browse files
committed
fix: mapPopup -> size props type
1 parent 261392a commit cc39ed0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/MapPopup.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import ReactDOM from "react-dom";
44
import styled from "styled-components";
55
import ResizeObserver, { SizeInfo } from "rc-resize-observer";
66

7-
const PopupWrapper = styled(Card)<{ $isPhone: boolean; size: number[] }>`
8-
min-width: ${(p) => p.size[0]}px;
9-
max-width: ${(p) => p.size[1]}px;
7+
const PopupWrapper = styled(Card)<{ $isPhone: boolean; size: string[] }>`
8+
min-width: ${(p) => p.size[0]};
9+
max-width: ${(p) => p.size[1]};
1010
${(p) =>
1111
p.$isPhone &&
1212
`
@@ -49,7 +49,7 @@ export interface PopupProps {
4949
footer?: React.ReactNode;
5050
overlay: any;
5151
element: HTMLElement;
52-
sizeMinMax?: number[];
52+
sizeMinMax?: string[];
5353
}
5454

5555
export const MapPopup: FC<PopupProps> = ({
@@ -61,7 +61,7 @@ export const MapPopup: FC<PopupProps> = ({
6161
footer,
6262
overlay,
6363
element,
64-
sizeMinMax = [500, 750],
64+
sizeMinMax = ["500px", "750px"],
6565
}) => {
6666
const resizer = (size: SizeInfo) => {
6767
overlay.setOffset([35, -size["height"] / 2]);

0 commit comments

Comments
 (0)