steveruizok
1/27/2019 - 11:27 AM

Framer X Events - ex1

Framer X Events - ex1

import { Override } from 'framer'

export const Hoverable: Override = () => {
	return {
		onMouseEnter(event) {
			const { x, y } = event.devicePoint
			console.log(`mouse entered at x: ${x} y: ${y}`)
		},
		onTap(event) {
			const { x, y } = event.devicePoint
			console.log(`mouse tapped at x: ${x} y: ${y}`)
		},
		onMouseLeave(event) {
			const { x, y } = event.devicePoint
			console.log(`mouse left at x: ${x} y: ${y}`)
		},
	}
}