JSPM

react-click-keypress

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q34397F
  • License MIT

Spread a click & enter/space key event on an element

Package Exports

  • react-click-keypress

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-click-keypress) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-click-keypress Build Status

Spread a click & enter/space key event on an element

Install

$ npm install --save react-click-keypress

Usage

var clickKeyProps = require('react-click-keypress')

<div role='button' tabIndex='0' {...clickKeyProps(handleClick)} />

API

clickKeyProps(handler) -> props

handler

An event handler. Takes a click event if click, key event if space/enter.

Returns a props object to spread onto a React element.

License

MIT © Andrew Joslin