-
Notifications
You must be signed in to change notification settings - Fork 0
SignUp
Chris edited this page Dec 8, 2019
·
6 revisions
The <SignUp />
component creates an Account in RevOps using only an accountId
supplied by the developer and an email that is provided by the customer.
Create a signup form to create accounts in RevOps with only a few lines of code.
import React from 'react'
import { SignUp } from 'revops-js'
/* Default stylesheet to configure look and feel */
import "revops-js/themes/defaultStyles.css"
export const App = ({ accountId, publicKey = 'your-public-api-key' }) => (
<SignUp
publicKey={publicKey}
account={{
accountId
}}
/>
)
export default App
Authorization Properties: You must supply at least one way of authorizing the request. These properties may also be supplied to the <RevOpsAuth />
component and passed down via prop drilling.
Prop | type | Description |
---|---|---|
publicKey | PropTypes.string | RevOps API Public Key. |
accessToken | PropTypes.string | RevOps API JWT. |
getToken() | PropTypes.func | A callback method to retrieve a token. |
Prop | type | Description |
---|---|---|
account | PropTypes.object | Initial account object to. |
saveRef | PropTypes.shape({ current: PropTypes.any }) | Assign a ref to add an external save button. If assigned, it will hide built-in buttons. |
styles | PropTypes.object | Inline CSS Style definition to customize the form. |
showNetworkError | PropTypes.bool | When set to false the default network error warnings will not appear. |
apiOptions | PropTypes.object | Optional configuration properties that you can use to override a specific environment, or select a different api environment. Example: apiOptions={{ env: 'sandbox' }} . See API Configuration for more info. |
Have questions, email us at support@revops.io