import FormWithResetOnSuccessfulSubmit from './reset-on-successful-submit.js';
const meta = {
    title: 'Scalars/Examples/Reset On Successful Submit',
    component: FormWithResetOnSuccessfulSubmit,
    tags: ['autodocs'],
    parameters: {
        layout: 'centered',
        docs: {
            source: {
                language: 'tsx',
                format: true,
                code: `
const FormWithResetOnSuccessfulSubmit = () => {
  return (
    <Form
      onSubmit={(data: FormData) => {
        alert(JSON.stringify(data, null, 2));
      }}
      resetOnSuccessfulSubmit
      defaultValues={{
        example: "",
        number: 0,
      }}
    >
      <div className="flex flex-col gap-2">
        <IdField />
        <StringField
          name="example"
          placeholder="Type something"
          label="Field example"
          required
          autoFocus
        />
        <NumberField name="number" label="Number" required />
        <Button type="submit">Submit</Button>
      </div>
    </Form>
  );
};
`,
            },
        },
    },
};
export default meta;
export const Default = {};
//# sourceMappingURL=reset-on-successful-submit.stories.js.map