3.4.0 • Published 2 years ago

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

Weekly downloads
54
License
-
Repository
-
Last release
2 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

2 years ago

3.0.0

2 years ago

2.46.0

3 years ago

2.43.0

3 years ago

2.23.0

4 years ago

2.18.0

4 years ago

2.17.4

4 years ago

2.16.2-alpha.2

4 years ago

2.16.2-alpha.1

4 years ago

2.16.2-alpha.0

4 years ago

2.16.1

4 years ago

2.15.0

4 years ago

2.10.1

4 years ago

2.10.1-test.10

4 years ago

2.11.0-alpha.10

4 years ago

2.10.1-alpha.10

4 years ago

2.8.2-alpha.51

4 years ago

2.7.0

4 years ago

2.6.6

4 years ago

2.6.2

4 years ago

2.5.4

4 years ago

2.2.6

4 years ago

2.2.2

4 years ago

2.1.2-alpha.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.2.4

4 years ago

1.3.0

4 years ago

1.1.17

4 years ago

1.1.16

4 years ago

1.0.27

5 years ago

1.0.25

5 years ago

1.0.23

5 years ago

1.0.17

5 years ago

1.0.10-alpha.1

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.0

5 years ago

0.8.9-alpha.132

5 years ago

0.8.7-next.87

5 years ago

0.9.0-alpha.87

5 years ago

0.9.0-alpha.86

5 years ago

0.9.0-alpha.85

5 years ago

0.9.0-alpha.81

5 years ago

0.9.0-alpha.79

5 years ago

0.8.7-alpha.79

5 years ago