const MyButton = () => ( <InjectHover> {({ isHovered, onMouseOver, onMouseOut }) => ( <button onMouseOver={onMouseOver} onMouseOut={onMouseOut}> {isHovered ? 'IM HOVERED' : 'IM NOT HOVERED'} </button> )} </InjectHover> );
Generated using TypeDoc
Example
const MyButton = () => ( <InjectHover> {({ isHovered, onMouseOver, onMouseOut }) => ( <button onMouseOver={onMouseOver} onMouseOut={onMouseOut}> {isHovered ? 'IM HOVERED' : 'IM NOT HOVERED'} </button> )} </InjectHover> );