react-native-hoverable
v0.2.0
Published
Hover event support for React Native Catalyst
Downloads
850
Readme
react-native-hoverable
Hover event support for React Native Catalyst
Installation
yarn add react-native-hoverable
Usage
import { Hoverable } from 'react-native-hoverable';
const HoverableView = () => (
<Hoverable
onMouseEnter={() => console.log('onMouseEnter')}
onMouseLeave={() => console.log('onMouseLeave')}
onMouseMove={() => console.log('onMouseMove')}
style={({ hovered }) => [
{ padding: hovered ? 20 : 0 },
{ backgroundColor: 'purple' },
]}
>
{({ hovered }) => (
<View
style={{
backgroundColor: hovered ? 'red' : 'green',
height: 100,
width: 100,
}}
/>
)}
</Hoverable>
);
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT