JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q53404F
  • License WTFPL-2.0

2R library button component implemented in React

Package Exports

  • 2r-button

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 (2r-button) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

2r-button

2R library button component implemented in React.

Instalation

2r-button is available as an npm package. Simply run npm install 2r-button command.

To use it in your project:

import button from '2r-button'; // ES6 syntax
var button = require('2r-button'); // ES5 syntax

Usage & API

The following props can be passed to the component:

  • disabled (Boolean): whether the button is disabled or not (defaults to false)

  • text (String): the text of the button (defaults to Button)

  • classes (String): a string of multiple classes, separated by space (defaults to '')

  • onClick (Function): the callback function to be executed when button is pressed

Examples

There is an examples folder inside the project with a minimum config. Steps to run:

  • Clone the project and

  • Run npm install

  • Run gulp examples

  • Navigate to http://localhost:5000

License

This software is released under the terms of WTFPL v2.0 license.