bv-register
v1.0.4
Published
``` npm install bv-register ```
Downloads
3
Readme
bv-register
npm install bv-register
Import & dependencies
Import the package first
import BvRegister from "bv-register";
Insert and configure the following line into your .env file
REACT_APP_SERVER=
The package requires ApolloProvider as a wrapper.
<ApolloProvider client={client}>
<App />
</ApolloProvider>
The package also requires reactstrap
npm install reactstrap react react-dom
npm install --save bootstrap
import "bootstrap/dist/css/bootstrap.min.css";
Basic Usage
function App() {
const [open, setOpen] = useState(true);
return (
<div>
<BvRegister
open={open}
setOpen={setOpen}
onSuccess={(token) => {
console.log("TOKEN => ", token);
}}
/>
</div>
);
}
Basic Params
| | required | default (explanation) |
| --------- | ---------- | --------------------- |
| open | required
| - |
| onSuccess | required
| returns token object |
| setOpen | required
| - |
| showBtn | optional
| true |
| btnText | optional
| SignIn/SignUp |