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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user