From b94c723f2d8a67c9880c399a50cb609a696dea3e Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Mon, 26 Oct 2020 08:58:25 +0300 Subject: [PATCH 1/3] add react tip button --- README.md | 16 ++++++++++++++++ package.json | 5 ++++- src/button-react.js | 22 ++++++++++++++++++++++ webpack.config.js | 12 ++++++++++-- 4 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 src/button-react.js diff --git a/README.md b/README.md index 32ec673a..8d83e82c 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ all, and write your own instead. ## Usage +- [Plain JavaScript](#.button-(%60superheroUtils.createButton%60)) +- [React.js](#.reactjs-component) + ### Button (`superheroUtils.createButton`) This library exports a function that creates buttons. This function accepts arguments: - class name of nodes that should become buttons, or the DOM node itself @@ -79,6 +82,19 @@ Additional examples can be found [here](./index.html). Paywall +## React.js component + +### Usage with ES6 + +Props the same with [plain js vesrion](#Button-(`superheroUtils.createButton`)). + +#### Example: +```js +import Button from '@aeternity/superhero-utils/button-react'; + +