/react-barong

Barong React SignUp and SignIn component library

Primary LanguageTypeScript

Cryptocurrency Exchange Platform - OpenDAX

Barong is part of OpenDAX Trading Platform

react-barong

NPM JavaScript Style Guide

Barong React Authentication components for barong

Installation

If you want to add package to your project run:

npm install --save react-barong

Glossary

BarongLoginForm

Login form

Name Type Required Description Default
redirection string Yes Redirection URL after successful submit.
host string Yes Barong host string. Example: https://foo-exchange.com/api/v2.
testMode boolean No If test mode is true, the submit is fired without calling the barong API.
forgotPasswordUrl string No If set, the forgot password lint will be appeared.
confirmationEmailSentText string No Text which appear after confirmation email is sent. Your email is not verified. We sent you confirmation link.

BarongRegisterForm

Register form

Name Type Required Description
redirection string Yes Redirection URL after successful submit.
host string Yes Barong host string. Example: https://foo-exchange.com/api/v2.
testMode boolean No If test mode is true, the submit is fired without calling the barong API.

BarongLogoutButton

Log out button

Name Type Required Description
redirection string Yes Redirection URL after successful submit.
host string Yes Barong host string. Example: https://foo-exchange.com/api/v2.
testMode boolean No If test mode is true, the submit is fired without calling the barong API.
render (options: LogoutButtonProps) => React.ReactElement No Renders custom button
text string No Buttons string content. Default value: Log Out

LogoutButtonProps

Log out button options

Name Type Required Description
onClick () => void Yes Click handler

BarongResetPasswordForm

Reset password form

Name Type Required Description Default
redirection string Yes Redirection URL after successful submit.
host string Yes Barong host string. Example: https://foo-exchange.com/api/v2.
testMode boolean No If test mode is true, the submit is fired without calling the barong API.
tokenParameterName string No Name of the query parameter for token. reset_password_token

BarongForgotPasswordForm

Reset password form

Name Type Required Description Default
host string Yes Barong host string. Example: https://foo-exchange.com/api/v2.
testMode boolean No If test mode is true, the submit is fired without calling the barong API.
delay number No Seconds passed the user can resend an email. 60

ConfirmEmailForm

Reset password form

Name Type Required Description Default
host string Yes Barong host string. Example: https://foo-exchange.com/api/v2.
testMode boolean No If test mode is true, the submit is fired without calling the barong API.
tokenParameterName string No Name of the query parameter for token. token
pendingContent React.ReactNode No Pending content. Pending confirmation...
successContent React.ReactNode No Success content. Your email is confirmed.
errorContent React.ReactNode No Error content. Confirmation error.

Demo

If you want to see demo of this application:

  1. Clone repositroy
  2. Run
npm install
npm build
  1. Go to ./example directory and start development server:
npm install
npm start

Local development

For local development you can change version of react-barong inside ./example/package.json for

"react-barong": "link:.."

then, in root folder, run

npm install
npm start

and start development server

cd ./example
npm install
npm start

License

Apache 2.0 © openware