Debian Codegraph @

node/@patternfly/react-core/src/components/ProgressStepper/examples/ProgressStepperBasicWithAlignment.tsx

raw
1 import { Fragment, useState } from 'react';
2 import { ProgressStepper, ProgressStep, Checkbox } from '@patternfly/react-core';
3
4 export const ProgressStepperBasicWithAlignment: React.FunctionComponent = () => {
5 const [isVertical, setIsVertical] = useState(false);
6 const [isCenterAligned, setIsCenterAligned] = useState(false);
7
8 return (
9 <Fragment>
10 <Checkbox
11 label="Vertical alignment"
12 isChecked={isVertical}
13 onChange={(_event, checked) => setIsVertical(checked)}
14 aria-label="Toggle vertical alignment"
15 id="toggle-vertical"
16 name="toggle-vertical"
17 />
18 <Checkbox
19 label="Center alignment"
20 isChecked={isCenterAligned}
21 onChange={(_event, checked) => setIsCenterAligned(checked)}
22 aria-label="Toggle center alignment"
23 id="toggle-center"
24 name="toggle-center"
25 />
26 <br />
27 <ProgressStepper
28 isVertical={isVertical}
29 isCenterAligned={isCenterAligned}
30 aria-label="Basic progress stepper with alignment"
31 >
32 <ProgressStep
33 variant="success"
34 description="This is the first thing to happen"
35 id="basic-alignment-step1"
36 titleId="basic-alignment-step1-title"
37 aria-label="completed step, step with success"
38 >
39 First step
40 </ProgressStep>
41 <ProgressStep
42 variant="info"
43 isCurrent
44 description="This is the second thing to happen"
45 id="basic-alignment-step2"
46 titleId="basic-alignment-step2-title"
47 aria-label="step with info"
48 >
49 Second step
50 </ProgressStep>
51 <ProgressStep
52 variant="pending"
53 description="This is the last thing to happen"
54 id="basic-alignment-step3"
55 titleId="basic-alignment-step3-title"
56 aria-label="pending step"
57 >
58 Third step
59 </ProgressStep>
60 </ProgressStepper>
61 </Fragment>
62 );
63 };