MCPcopy
hub / github.com/callstack/react-native-paper / getTooltipYPosition

Function getTooltipYPosition

src/components/Tooltip/utils.ts:83–91  ·  view source on GitHub ↗
(
  { pageY: childrenY, height: childrenHeight }: ChildrenMeasurement,
  { height: tooltipHeight }: TooltipLayout
)

Source from the content-addressed store, hash-verified

81};
82
83const getTooltipYPosition = (
84 { pageY: childrenY, height: childrenHeight }: ChildrenMeasurement,
85 { height: tooltipHeight }: TooltipLayout
86): number => {
87 if (overflowBottom(childrenY, childrenHeight, tooltipHeight))
88 return childrenY - tooltipHeight;
89
90 return childrenY + childrenHeight;
91};
92
93const getChildrenMeasures = (
94 style: StyleProp<ViewStyle>,

Callers 1

getTooltipPositionFunction · 0.85

Calls 1

overflowBottomFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…