ButtonSubmit

A form submit button that displays loading and success state.

It implements the <Button> component.

Props

success

TypeBoolean (optional)
Defaultfalse

When true and the loading prop is false, sets the <button> element’s disabled attribute and indicates success with a tick icon.

...props

Type…* (optional)

Additional props for the container; a <Button> component.

Examples

Submit button.
import { ButtonSubmit } from 'device-agnostic-ui'

<ButtonSubmit>Submit</ButtonSubmit>
If the form submission is loading.
import { ButtonSubmit } from 'device-agnostic-ui'

<ButtonSubmit loading>Submit</ButtonSubmit>
If the form submission was successful.
import { ButtonSubmit } from 'device-agnostic-ui'

<ButtonSubmit success>Submit</ButtonSubmit>

Tags