From 0e6d9f6362f506a2df4e88d35d71a0d0a7f0900d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3n=20Trausti?= Date: Sat, 3 Jul 2021 17:10:58 +0000 Subject: [PATCH] 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 --- src/index.css | 4 ++++ stories/Tooltip.stories.tsx | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/index.css b/src/index.css index cb8cedf..47a717a 100644 --- a/src/index.css +++ b/src/index.css @@ -32,4 +32,8 @@ default style for popup stroke: #d7d7d7; stroke-dasharray: 30px; stroke-dashoffset: -54px; + left: 0; + right: 0; + top: 0; + bottom: 0; } diff --git a/stories/Tooltip.stories.tsx b/stories/Tooltip.stories.tsx index f83b31f..55c008c 100644 --- a/stories/Tooltip.stories.tsx +++ b/stories/Tooltip.stories.tsx @@ -21,7 +21,14 @@ const Template: Story = args => ( export const SimpleTooltip = Template.bind({}); SimpleTooltip.args = { - trigger: , + trigger: , +}; + +export const CenteredTextTooltip = Template.bind({}); + +CenteredTextTooltip.args = { + trigger: , + contentStyle: {textAlign: 'center'} }; const PositionsTooltipTemplate: Story = args => (