(
{ children, tooltip, measured }: Measurement,
component: React.ReactElement<{
style: StyleProp<ViewStyle>;
}>
)
| 123 | }; |
| 124 | |
| 125 | export const getTooltipPosition = ( |
| 126 | { children, tooltip, measured }: Measurement, |
| 127 | component: React.ReactElement<{ |
| 128 | style: StyleProp<ViewStyle>; |
| 129 | }> |
| 130 | ): {} | { left: number; top: number } => { |
| 131 | if (!measured) return {}; |
| 132 | let measures = children; |
| 133 | if (component.props.style) { |
| 134 | measures = getChildrenMeasures(component.props.style, children); |
| 135 | } |
| 136 | |
| 137 | return { |
| 138 | left: getTooltipXPosition(measures, tooltip), |
| 139 | top: getTooltipYPosition(measures, tooltip), |
| 140 | }; |
| 141 | }; |
no test coverage detected
searching dependent graphs…