Skip to content

Commit 0e6d9f6

Browse files
authored
Fix : Fixed arrow when contentStyle has textAlign center (#222)
Added story for centered text Fixed arrow in cases where the contentStyle has textAlign set to center
1 parent 9c7ce89 commit 0e6d9f6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,8 @@ default style for popup
3232
stroke: #d7d7d7;
3333
stroke-dasharray: 30px;
3434
stroke-dashoffset: -54px;
35+
left: 0;
36+
right: 0;
37+
top: 0;
38+
bottom: 0;
3539
}

stories/Tooltip.stories.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ const Template: Story<PopupProps> = args => (
2121
export const SimpleTooltip = Template.bind({});
2222

2323
SimpleTooltip.args = {
24-
trigger: <button> click Me </button>,
24+
trigger: <button> Click Me </button>,
25+
};
26+
27+
export const CenteredTextTooltip = Template.bind({});
28+
29+
CenteredTextTooltip.args = {
30+
trigger: <button> Click Me </button>,
31+
contentStyle: {textAlign: 'center'}
2532
};
2633

2734
const PositionsTooltipTemplate: Story<PopupProps> = args => (

0 commit comments

Comments
 (0)