0.3.3 • Published 12 days ago

@igloo-ui/stepper v0.3.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 days ago

Stepper

The Stepper component provides a visual representation of a multi-step process.

Installation

To install @igloo-ui/stepper in your project, you will need to run the following command using npm:

npm install @igloo-ui/stepper

If you prefer Yarn, use the following command instead:

yarn add @igloo-ui/stepper

Usage

Then to use the component in your code just import it!

import Button from '@igloo-ui/button';
import Stepper from '@igloo-ui/stepper';

const [currentStep, setCurrentStep] = React.useState(0);
const exampleSteps = [
  { title: 'Step 1', onClick: (index) => setCurrentStep(index) },
  { title: 'Step 2', onClick: (index) => setCurrentStep(index) },
  { title: 'Step 3', onClick: (index) => setCurrentStep(index) },
];

<Stepper
  currentStep={currentStep}
  style={{ flex: '1 1 auto' }}
  steps={exampleSteps}
/>
<Button
  onClick={() => setCurrentStep((prevCurrentStep) => prevCurrentStep + 1)}
  disabled={currentStep === exampleSteps.length - 1}
>
  Continue
</Button>;
0.3.3

12 days ago

0.3.2

1 month ago

0.3.1

3 months ago

0.3.0

4 months ago

0.2.4

4 months ago

0.2.3

5 months ago

0.2.2

5 months ago

0.2.1

6 months ago

0.1.2

9 months ago

0.2.0

8 months ago

0.1.1

9 months ago

0.1.0

12 months ago

0.0.0

12 months ago