@atlaskit/icon
Version:
An icon is a symbol representing a command, device, directory, or common action.
10 lines (9 loc) • 451 B
JavaScript
import { useContext } from 'react';
import { AnimatedIconContext } from './animated-icon-context';
/**
* Returns the state of the nearest `AnimatedIconTrigger`, or `undefined` when there is none.
*
* The trigger only signals. Each animated icon decides how to respond, calls `start()` when it
* begins, and calls the `done` function it returns when it has finished.
*/
export const useAnimatedIconTrigger = () => useContext(AnimatedIconContext);