UNPKG

860 BTypeScriptView Raw
1import type { MeasuredDimensions } from '../commonTypes';
2import type { AnimatedRef } from '../hook/commonTypes';
3import type { Component } from 'react';
4type Measure = <T extends Component>(animatedRef: AnimatedRef<T>) => MeasuredDimensions | null;
5/**
6 * Lets you synchronously get the dimensions and position of a view on the
7 * screen.
8 *
9 * @param animatedRef - An [animated
10 * ref](https://docs.swmansion.com/react-native-reanimated/docs/core/useAnimatedRef#returns)
11 * connected to the component you'd want to get the measurements from.
12 * @returns An object containing component measurements or null when the
13 * measurement couldn't be performed- {@link MeasuredDimensions}.
14 * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/measure/
15 */
16export declare let measure: Measure;
17export {};
18//# sourceMappingURL=measure.d.ts.map
\No newline at end of file