| 1 |
import { ProgressStepper, ProgressStep, Popover } from '@patternfly/react-core'; |
| 2 |
|
| 3 |
export const PopoverProgressStep = () => ( |
| 4 |
<ProgressStepper aria-label="Progress stepper with help popover"> |
| 5 |
<ProgressStep |
| 6 |
variant="success" |
| 7 |
id="popover-step1" |
| 8 |
titleId="popover-step1-title" |
| 9 |
aria-label="completed step with popover, step with success" |
| 10 |
popoverRender={(stepRef) => ( |
| 11 |
<Popover |
| 12 |
aria-label="First step help" |
| 13 |
headerContent={<div>First step popover</div>} |
| 14 |
bodyContent={<div>Additional info or help text content.</div>} |
| 15 |
triggerRef={stepRef} |
| 16 |
position="right" |
| 17 |
/> |
| 18 |
)} |
| 19 |
> |
| 20 |
First step |
| 21 |
</ProgressStep> |
| 22 |
<ProgressStep |
| 23 |
variant="danger" |
| 24 |
id="popover-step2" |
| 25 |
titleId="popover-step2-title" |
| 26 |
aria-label="completed step with popover, step with danger" |
| 27 |
popoverRender={(stepRef) => ( |
| 28 |
<Popover |
| 29 |
aria-label="Second step help" |
| 30 |
headerContent={<div>Second step popover</div>} |
| 31 |
bodyContent={<div>Additional info or help text content.</div>} |
| 32 |
triggerRef={stepRef} |
| 33 |
position="right" |
| 34 |
/> |
| 35 |
)} |
| 36 |
> |
| 37 |
Second step |
| 38 |
</ProgressStep> |
| 39 |
<ProgressStep |
| 40 |
variant="info" |
| 41 |
id="popover-step3" |
| 42 |
titleId="popover-step3-title" |
| 43 |
aria-label="step with popover" |
| 44 |
popoverRender={(stepRef) => ( |
| 45 |
<Popover |
| 46 |
aria-label="Third step help" |
| 47 |
headerContent={<div>Third step popover</div>} |
| 48 |
bodyContent={<div>Additional info or help text content.</div>} |
| 49 |
triggerRef={stepRef} |
| 50 |
position="right" |
| 51 |
/> |
| 52 |
)} |
| 53 |
isCurrent |
| 54 |
> |
| 55 |
Third step |
| 56 |
</ProgressStep> |
| 57 |
<ProgressStep variant="pending" id="popover-step4" titleId="popover-step4-title" aria-label="pending step"> |
| 58 |
Fourth step |
| 59 |
</ProgressStep> |
| 60 |
</ProgressStepper> |
| 61 |
); |