Merged in chore/sw-3145-move-tooltip (pull request #2514)

chore(SW-3145): Move Tooltip to design-system

* Move Tooltip to design-system


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-07-03 13:00:12 +00:00
parent daf765f3d5
commit 0ee6e8800d
6 changed files with 33 additions and 34 deletions

View File

@@ -1,22 +0,0 @@
export type TooltipPosition = "left" | "right" | "top" | "bottom"
type VerticalArrow = "top" | "bottom" | "center"
type HorizontalArrow = "left" | "right" | "center"
type ValidArrowMap = {
left: VerticalArrow
right: VerticalArrow
top: HorizontalArrow
bottom: HorizontalArrow
}
type ValidArrow<P extends TooltipPosition> = P extends keyof ValidArrowMap
? ValidArrowMap[P]
: never
export interface TooltipProps<P extends TooltipPosition = TooltipPosition> {
heading?: string
text?: string
position: P
arrow: ValidArrow<P>
isTouchable?: boolean
}