1.0.2 • Published 6 years ago

@mmgj/react-invisibutton v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

@mmgj/react-invisibutton

Accessible yet invisible wrapper for blinged out clickables

Wraps a DOM element in <button> tags stripped of all visible styles.

Install

  npm i @mmgj/react-invisibutton

or

  yarn add @mmgj/react-invisibutton

Usage

  import InvisiButton from '@mmgj/react-invisibutton';
  ...

  <InvisiButton onClick={clickHandler}>
    <div style={{ /* Crazy stuff here */}}> Click me!</div>
  </InvisiButton>

Props

PropTypeDefaultDescription
onClickfunc() => false;Click handler
childrennode*required*Any renderable element
styleobject{}Styles for the button element
type'button', 'submit' or 'reset''button'Override the button type
className'string'''Additional classes for button element 1

1 The button element ships with the class name invisibutton__reset by default. I really hope this isn't your favorite class name.