@tutim/headless
Version:
form infrastructure for web applications
37 lines (36 loc) • 982 B
TypeScript
/// <reference types="react" />
import { WizardProps } from '@tutim/types';
/**
* fully managed TutimWizard.
*
* @remarks
* [API](https://docs.tutim.io/) • [Builder](https://tutim.io/)
*
* @param props - form configuration and actions.
*
* @example
* ```tsx
* import { TutimProvider, TutimWizard } from '@tutim/headless';
* import { defaultFields } from '@tutim/fields';
*
* const config = {
* fields: [
* { key: 'firstName', label: 'First Name', type: 'text' },
* { key: 'lastName', label: 'Last Name', type: 'text' },
* ],
* };
*
* const App = (): JSX.Element => {
* return (
* <div className="App">
* <TutimProvider fieldComponents={defaultFields}>
* <TutimWizard onSubmit={console.log} config={config} />
* </TutimProvider>
* </div>
* );
* };
*
* export default App;
* ```
*/
export declare const TutimWizard: ({ formId, config, onSubmit, initialValues, wizardContext }: WizardProps) => JSX.Element;