Skip to content

Commit

Permalink
Fix : Fixed arrow when contentStyle has textAlign center (#222)
Browse files Browse the repository at this point in the history
Added story for centered text
Fixed arrow in cases where the contentStyle has textAlign set to center
  • Loading branch information
raRaRa authored Jul 3, 2021
1 parent 9c7ce89 commit 0e6d9f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ default style for popup
stroke: #d7d7d7;
stroke-dasharray: 30px;
stroke-dashoffset: -54px;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
9 changes: 8 additions & 1 deletion stories/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ const Template: Story<PopupProps> = args => (
export const SimpleTooltip = Template.bind({});

SimpleTooltip.args = {
trigger: <button> click Me </button>,
trigger: <button> Click Me </button>,
};

export const CenteredTextTooltip = Template.bind({});

CenteredTextTooltip.args = {
trigger: <button> Click Me </button>,
contentStyle: {textAlign: 'center'}
};

const PositionsTooltipTemplate: Story<PopupProps> = args => (
Expand Down

0 comments on commit 0e6d9f6

Please sign in to comment.