@jouwomgeving/ui-events

Dictator package JO ui events

Stats

StarsIssuesVersionUpdatedCreatedSize
@jouwomgeving/ui-events
1.2.5a year ago5 years agoMinified + gzip package size for @jouwomgeving/ui-events in KB

Readme

Events

$ npm install @jouwomgeving/ui-events

Point

Usage

import React from 'react';
import * as Events from '@jouwomgeving/ui-events';

function Layout() {
  return (
    <div>
      <Events.Container onPoint={() => alert('Click')}>
        Triggered on click
      </Events.Container>
      <Events.Container onHover={() => alert('Hover')}>
        Triggered on hover
      </Events.Container>
    </div>
  )
}

export default Layout;

About

A Component which normalizes the pointer events in multiple browsers. Also it exposes a onHover callback which will not work on touch screens.

Properties

Props Values Default Required
onHover Function No
onPoint Function No

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.