Skip to content

Commit 6c2c39c

Browse files
borderColor prop added to MiniMapProps (#380)
* borderColor prop added to MiniMapProps * fix: 🚑 ignoreDeprecations added to tsconfig.json
1 parent 51c144b commit 6c2c39c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/mini-map/mini-map.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type MiniMapProps = {
1919
children: React.ReactNode;
2020
width?: number;
2121
height?: number;
22+
borderColor?: string;
2223
} & React.DetailedHTMLProps<
2324
React.HTMLAttributes<HTMLDivElement>,
2425
HTMLDivElement
@@ -38,6 +39,7 @@ const previewStyles = {
3839
export const MiniMap: React.FC<MiniMapProps> = ({
3940
width = 200,
4041
height = 200,
42+
borderColor = "red",
4143
children,
4244
...rest
4345
}) => {
@@ -176,7 +178,11 @@ export const MiniMap: React.FC<MiniMapProps> = ({
176178
<div {...rest} ref={wrapperRef} className="rzpp-wrapper">
177179
{children}
178180
</div>
179-
<div className="rzpp-preview" ref={previewRef} style={previewStyles} />
181+
<div
182+
className="rzpp-preview"
183+
ref={previewRef}
184+
style={{ ...previewStyles, borderColor }}
185+
/>
180186
</div>
181187
);
182188
};

0 commit comments

Comments
 (0)