@atlaskit/motion
Version:
A set of utilities to apply motion in your application.
13 lines (12 loc) • 385 B
TypeScript
type Element = HTMLElement | null;
export type CallbackRef = (instance: Element) => void;
/**
* Will return a tuple of the element and the callback ref to set.
* This is used as a work around for using `useRef` directly with Typescript
* as the types don't flow through as one would expect.
*/
export declare const useElementRef: () => [
Element,
CallbackRef
];
export {};