Skip to content

Commit

Permalink
fix: Fixed tooltip arrow center position
Browse files Browse the repository at this point in the history
  • Loading branch information
erezcarmel committed Nov 23, 2022
1 parent e0433d4 commit 13f6e75
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/decorators/styler.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ function generateStyle(
background-color: inherit;
position: absolute;
z-index: 2;
width: 18px;
height: 10px;
width: 20px;
height: 12px;
}
.${uuid}.place-top::after {
content: "";
Expand All @@ -70,7 +70,7 @@ function generateStyle(
z-index: 1;
bottom: -6px;
left: 50%;
margin-left: -8px;
margin-left: -6px;
transform: rotate(135deg);
}
Expand All @@ -96,7 +96,7 @@ function generateStyle(
z-index: 1;
top: -6px;
left: 50%;
margin-left: -8px;
margin-left: -6px;
transform: rotate(45deg);
}
Expand Down
15 changes: 11 additions & 4 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,13 @@ describe('Tooltip', () => {
}
],
[
{ textColor: 'teal', backgroundColor: 'orange' },
{ popupType: 'type-custom', textColor: 'teal', background: 'orange' }
{ textColor: 'teal', backgroundColor: 'orange', arrowColor: 'orange' },
{
popupType: 'type-custom',
textColor: 'teal',
background: 'orange',
arrowColor: 'orange'
}
],
[
{ textColor: 'green', arrowColor: 'red' },
Expand Down Expand Up @@ -185,7 +190,8 @@ describe('Tooltip', () => {
border: true,
borderColor: 'blue',
arrowRadius: '2',
tooltipRadius: '4'
tooltipRadius: '4',
arrowColor: '#222'
},
{
popupType: 'type-custom',
Expand All @@ -201,7 +207,8 @@ describe('Tooltip', () => {
{
border: true,
borderClass: 'custom-border-class',
borderColor: '#414141'
borderColor: '#414141',
arrowColor: '#222'
},
{
borderColor: '#414141',
Expand Down

0 comments on commit 13f6e75

Please sign in to comment.