Skip to content

SubmitButton

Description

DataContext.SubmitButton connects to the DataContext.Context to submit the active state of the DataContext, triggering onSubmit.

Demos

Standard text

<DataContext.Context.Provider
value={{
...defaultContextState,
handleSubmit: () => console.log('handleSubmit'),
}}
>
<DataContext.SubmitButton />
</DataContext.Context.Provider>

Properties

PropertyTypeDescription
childrenReact.Node(required) Button text.
data-testidstring(required) Test ID.