From ca4e7f9cc04b8f43055838cdbcb274b00f219b0e Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 23 Jun 2025 14:50:32 +0300 Subject: [PATCH] add transform origin to animation --- src/components/Tooltip/index.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/Tooltip/index.tsx b/src/components/Tooltip/index.tsx index 9e19612157..8f52f1cdd4 100644 --- a/src/components/Tooltip/index.tsx +++ b/src/components/Tooltip/index.tsx @@ -294,7 +294,9 @@ function Bubble({ left: coords.left, }, ]}> - + ) } + +function oppposite(position: 'top' | 'bottom') { + switch (position) { + case 'top': + return 'center bottom' + case 'bottom': + return 'center top' + default: + return 'center' + } +}