Skip to content

Latest commit

 

History

History
127 lines (82 loc) · 2.33 KB

signature.md

File metadata and controls

127 lines (82 loc) · 2.33 KB

Signature

Source

A component to let the user subscribe

Usage

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 {...} />

Props

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

buttonText?: string

The text shown in the button


buttonWrapperClassName

buttonWrapperClassName?: string

the className to use on the button wrapping div


disabled

disabled?: boolean

whether the subscribe button is disabled


skipLoadAndSave

skipLoadAndSave?: boolean

disables loading and saving of the signature


onSubscribe

onSubscribe?: function

callback which is called when the user subscribes


onEdit

onEdit?: function

callback which is called when the user edits his subscription


forceInitialShow

forceInitialShow?: boolean

Forces to show signature on initial render


showDeleteIcon

showDeleteIcon?: boolean

whether the icon to delete the signature should be shown