A component to let the user subscribe
You should have the chayns-components
package installed. If that is not the
case already, run
yarn add chayns-components
or
npm i chayns-components
After the chayns-components
package is installed, you can import the component
and use it with React:
import React from 'react'
import { Signature } from 'chayns-components';
// ...
<Signature {...} />
The Signature
-component takes the following props:
Name | Type | Default | Required |
---|---|---|---|
buttonText | string |
||
buttonWrapperClassName | string |
||
disabled | boolean |
false |
|
skipLoadAndSave | boolean |
false |
|
onSubscribe | function |
||
onEdit | function |
||
forceInitialShow | boolean |
false |
|
showDeleteIcon | boolean |
false |
buttonText?: string
The text shown in the button
buttonWrapperClassName?: string
the className to use on the button wrapping div
disabled?: boolean
whether the subscribe button is disabled
skipLoadAndSave?: boolean
disables loading and saving of the signature
onSubscribe?: function
callback which is called when the user subscribes
onEdit?: function
callback which is called when the user edits his subscription
forceInitialShow?: boolean
Forces to show signature on initial render
showDeleteIcon?: boolean
whether the icon to delete the signature should be shown