Skip to content

Commit 9edd841

Browse files
authored
Merge pull request #93 from adaptui/refactoring-components
2 parents 85d1770 + 1e4df3d commit 9edd841

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/components/slider/SliderTooltip.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const TooltipArrow: React.FC = () => {
2020
<Svg width="100%" height="100%" viewBox="0 0 12 5" fill="none">
2121
<Path
2222
d="M11.1466 0C16.3801 0 -4.3808 0 0.853735 0C2.7834 0 4.5931 5 6.00014 5C7.40719 5 9.23748 0 11.1466 0Z"
23-
fill="#27272A"
23+
fill="#171717"
2424
/>
2525
</Svg>
2626
);
@@ -83,6 +83,7 @@ const RNSliderTooltip: React.FC<Partial<SliderTooltipProps>> = props => {
8383
const animatedArrowStyle = useAnimatedStyle(() => {
8484
return {
8585
top: undefined,
86+
bottom: 0.5,
8687
left: tooltipWidth.value / 2 - defaultArrowWidth / 2,
8788
};
8889
}, [tooltipWidth.value]);
@@ -96,7 +97,7 @@ const RNSliderTooltip: React.FC<Partial<SliderTooltipProps>> = props => {
9697
],
9798
display: isDragging.value ? "flex" : "none",
9899
left: knobRadius - tooltipWidth.value / 2,
99-
bottom: sliderTheme.size[size]?.tooltip.position * 2 + 6,
100+
bottom: sliderTheme.size[size]?.tooltip.position * 2,
100101
};
101102
}, [tooltipWidth.value]);
102103

src/theme/defaultTheme/slider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const slider = {
1414
knobRadius: 9,
1515
},
1616
tooltip: {
17-
position: (18 - 2) / 2,
17+
position: 6,
1818
},
1919
knobIcon: {
2020
default: "w-2.5 h-2.5",
@@ -29,7 +29,7 @@ export const slider = {
2929
knobRadius: 10,
3030
},
3131
tooltip: {
32-
position: (20 - 4) / 2,
32+
position: 8,
3333
},
3434
knobIcon: {
3535
default: "w-2.5 h-2.5",
@@ -44,7 +44,7 @@ export const slider = {
4444
knobRadius: 12,
4545
},
4646
tooltip: {
47-
position: (24 - 8) / 2,
47+
position: 8,
4848
},
4949
knobIcon: {
5050
default: "w-3 h-3",
@@ -59,7 +59,7 @@ export const slider = {
5959
knobRadius: 14,
6060
},
6161
tooltip: {
62-
position: (28 - 10) / 2,
62+
position: 8,
6363
},
6464
knobIcon: {
6565
default: "w-4 h-4",
@@ -87,7 +87,7 @@ export const slider = {
8787
tooltip: {
8888
default: "absolute",
8989
wrapper:
90-
"px-2 py-1.5 min-w-8 justify-center items-center bg-gray-800 rounded-lg",
90+
"px-2 py-1.5 min-w-8 justify-center items-center bg-gray-900 rounded-lg",
9191
arrowWrapper: "w-3 h-3 z-10",
9292
common: "text-cxs text-white-900 text-center font-normal leading-4",
9393
},

0 commit comments

Comments
 (0)