React component to display a login with blockstack button.
With npm:
npm install react-blockstack-button --save
Or with yarn:
yarn add react-blockstack-button
import React from 'react';
import ReactDOM from 'react-dom';
import { BlockstackButton } from 'react-blockstack-button';
const App = () => {
const handleLogin = () => {
// Call the blockstack sdk there
};
return <BlockstackButton onClick={handleLogin} />;
};
ReactDOM.render(<App />, document.getElementById('app'));