Skip to content

Commit a98226a

Browse files
fixed some code
1 parent d592ca9 commit a98226a

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ export default function ComponentMap({
289289
const handleMouseEnter = () => {
290290
setIsHovered(true);
291291
setStrokeColor(hoverClass);
292+
// make box
292293
};
293294
const handleMouseLeave = () => {
294295
setIsHovered(false);
@@ -316,18 +317,23 @@ export default function ComponentMap({
316317
// isHovered ? stroke="ab269b" : stroke; */
317318

318319
return (
319-
<LinkComponent
320-
className='compMapLink'
321-
key={i}
322-
data={link}
323-
percent={stepPercent}
324-
stroke={strokeColor} // changing this color on hover
325-
strokeWidth= {strokeWidthIndex} /* strokeWidth */ // width of the link
326-
fill='none'
327-
//testing hover functionality
328-
onMouseEnter={handleMouseEnter}
329-
onMouseLeave={handleMouseLeave}
330-
/>
320+
<>
321+
<LinkComponent
322+
className='compMapLink'
323+
key={i}
324+
data={link}
325+
percent={stepPercent}
326+
stroke={strokeColor} // changing this color on hover
327+
strokeWidth= {strokeWidthIndex} /* strokeWidth */ // width of the link
328+
fill='none'
329+
//testing hover functionality
330+
onMouseEnter={handleMouseEnter}
331+
onMouseLeave={handleMouseLeave}
332+
/>
333+
<div className='linkHoverInfo'>
334+
<h2>Props: </h2>
335+
</div>
336+
</>
331337
)
332338
})
333339
}
@@ -541,7 +547,7 @@ export default function ComponentMap({
541547
</Tree>
542548
</Group>
543549
</svg>
544-
{tooltipOpen && tooltipData && (
550+
{tooltipOpen && tooltipData && ( // if the tooltip is open and there is data to display...
545551
<TooltipInPortal
546552
// set this to random so it correctly updates with parent bounds
547553
key={Math.random()}
@@ -584,6 +590,7 @@ export default function ComponentMap({
584590
</div>
585591
</TooltipInPortal>
586592
)}
593+
587594
</div>
588595
);
589596
}

src/app/styles/components/_componentMap.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
// .compMapLink:hover {
66
// box-shadow: 10px 10px rgb(163, 205, 24);
77
// };
8+
* {
9+
border: 1px solid red;
10+
}
811

912
.comp-map-options {
1013
color: $map-options-label;
@@ -50,3 +53,9 @@
5053
}
5154

5255

56+
.linkHoverInfo {
57+
height: 100px;
58+
width: 100px;
59+
background-color: #f1f1f1;
60+
z-index: 100;
61+
}

0 commit comments

Comments
 (0)