react-native-web-hooks
Version:
Hooks for React Native web and Expo
33 lines (32 loc) • 1.11 kB
TypeScript
import * as React from 'react';
export default class Hoverable extends React.Component<{
children: (isHovered: boolean) => any | React.ReactChild;
onHoverIn?: Function;
onHoverOut?: Function;
}, {
isHovered: boolean;
showHover: boolean;
}> {
static displayName: string;
static propTypes: {
children: import("prop-types").Requireable<((...args: any[]) => any) | import("prop-types").ReactElementLike>;
onHoverIn: import("prop-types").Requireable<(...args: any[]) => any>;
onHoverOut: import("prop-types").Requireable<(...args: any[]) => any>;
};
state: {
isHovered: boolean;
showHover: boolean;
};
_handleMouseEnter: (e: any) => void;
_handleMouseLeave: (e: any) => void;
_handleGrant: () => void;
_handleRelease: () => void;
render(): React.DetailedReactHTMLElement<{
onMouseEnter: (e: any) => void;
onMouseLeave: (e: any) => void;
onResponderGrant: () => void;
onResponderRelease: () => void;
onPressIn: () => void;
onPressOut: () => void;
}, HTMLElement>;
}