UNPKG

@ozen-ui/kit

Version:

React component library

16 lines (15 loc) 552 B
import { useHover } from '../../../hooks/useHover'; import { useListCardItemContext } from '../ListCardItemContext'; export var useListCardItemAsInteractiveModule = function (ref, isEnabled) { if (isEnabled === void 0) { isEnabled = true; } var hoverControl = useListCardItemContext().hoverControl; useHover(ref, { onEnter: function () { hoverControl.setIsHoverChildren(true); }, onLeave: function () { hoverControl.setIsHoverChildren(false); }, active: isEnabled, }); };