Skip to content

Commit 421d149

Browse files
committed
feat: simplify Tooltip component by removing unnecessary SVG elements and adjusting styles
1 parent 61c7232 commit 421d149

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/components/tooltip/Tooltip.style.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313
@include box.box(variables.$secondary);
1414
@include helpers.fontStyle();
1515
@include helpers.borderRadius();
16-
box-shadow: none;
16+
border: none;
1717
}
1818
}
1919

2020
&__arrow {
21-
stroke: helpers.borderColor(variables.$secondary);
22-
stroke-width: 2px;
2321
fill: helpers.backgroundColor(variables.$secondary);
2422
}
2523

src/components/tooltip/Tooltip.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,5 @@ export const TooltipContent: React.FC<TooltipContentProps> = (props) => {
3030
}
3131

3232
export const TooltipArrow: React.FC<TooltipArrowProps> = (props) => {
33-
return <RadixTooltip.TooltipArrow {...mergeCode0Props("tooltip__arrow", {}) as TooltipArrowProps} asChild>
34-
<svg className="tooltip__arrow" width="10" height="5" viewBox="0 0 30 10" preserveAspectRatio="none"
35-
style={{display: "block"}}>
36-
<polygon points="0,0 30,0 15,8"/>
37-
<path
38-
d="M0 0 L15 8 L30 0"
39-
/>
40-
</svg>
41-
</RadixTooltip.TooltipArrow>
33+
return <RadixTooltip.TooltipArrow {...mergeCode0Props("tooltip__arrow", {}) as TooltipArrowProps}/>
4234
}

0 commit comments

Comments
 (0)