3.4.0 • Published 3 years ago

@comparaonline/ui-wizard-form-next v3.4.0

Weekly downloads
54
License
-
Repository
-
Last release
3 years ago

@comparaonline/ui-wizard-form

This is the Form component that contains every input. It uses the react-final-form(RFF) Form component to handle value's state.

Installation

yarn add @comparaonline/ui-wizard-form

Usage

WizardForm

This component receives some mandatory props in order to initialize the react-final-form(RFF) Form component

  1. formProps: These props are passed directly to the RFF's Form component, so if you need to pass something directly to the component, this is the way.

  2. next, previous, isLastStep, isFirstStep: These functions allows to the component to correctly render navigation buttons and loading messages.

  3. currentStep: the step to render.

  4. stepId: A possible value to try to move that step, intended to be used in conjunction with router.

  5. router: a method that can be used to modify the routes, if passed must implement the required interface

Example

import { WizardForm } from '@comparaonline/ui-wizard-form';

<WizardForm
  formProps={{ onSubmit }}
  currentStep={{ id: '1' }}
  next={navigationFunction}
  previous={navigationFunction}
  isLastStep={booleanFunction}
  isFirstStep={booleanFunction}
  isLoading={false}
  stepId="2"
  router={
    push: (stepId: string) => void,
    replace: (stepId: string) => void
  }
/>

WizardFormLayout Components

Use them as containers of different WizardForm content.

import { WizardFormLayout } from '@comparaonline/ui-wizard-form';

<WizardFormLayout.Actions>
  <Button>Continue</Button>
  <Button>Skip</Button>
</WizardFormLayout.Actions>;
3.4.0

3 years ago

3.0.0

3 years ago

2.46.0

4 years ago

2.43.0

4 years ago

2.23.0

4 years ago

2.18.0

5 years ago

2.17.4

5 years ago

2.16.2-alpha.2

5 years ago

2.16.2-alpha.1

5 years ago

2.16.2-alpha.0

5 years ago

2.16.1

5 years ago

2.15.0

5 years ago

2.10.1

5 years ago

2.10.1-test.10

5 years ago

2.11.0-alpha.10

5 years ago

2.10.1-alpha.10

5 years ago

2.8.2-alpha.51

5 years ago

2.7.0

5 years ago

2.6.6

5 years ago

2.6.2

5 years ago

2.5.4

5 years ago

2.2.6

5 years ago

2.2.2

5 years ago

2.1.2-alpha.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.2.4

5 years ago

1.3.0

5 years ago

1.1.17

5 years ago

1.1.16

5 years ago

1.0.27

6 years ago

1.0.25

6 years ago

1.0.23

6 years ago

1.0.17

6 years ago

1.0.10-alpha.1

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.0

6 years ago

0.8.9-alpha.132

6 years ago

0.8.7-next.87

6 years ago

0.9.0-alpha.87

6 years ago

0.9.0-alpha.86

6 years ago

0.9.0-alpha.85

6 years ago

0.9.0-alpha.81

6 years ago

0.9.0-alpha.79

6 years ago

0.8.7-alpha.79

6 years ago