@atlaskit/icon
Version:
An icon is a symbol representing a command, device, directory, or common action.
12 lines (11 loc) • 491 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 var useAnimatedIconTrigger = function useAnimatedIconTrigger() {
return useContext(AnimatedIconContext);
};