import React from 'react'; import { EmptyState, EmptyStateHeader, EmptyStateFooter, EmptyStateBody, EmptyStateActions, EmptyStateIcon, Progress, Button } from '@breakaway/preact-core'; import { Wizard as WizardDeprecated } from '@breakaway/preact-core/deprecated'; // eslint-disable-next-line patternfly-react/import-tokens-icons import { CogsIcon } from '@patternfly/react-icons'; interface finishedProps { onClose: () => void; } const FinishedStep: React.FunctionComponent = (props: finishedProps) => { const [percent, setPercent] = React.useState(0); const tick = () => { setPercent((prevPercent) => { if (prevPercent < 100) { return prevPercent + 20; } else { return prevPercent; } }); }; React.useEffect(() => { const interval = setInterval(() => tick(), 1000); if (percent >= 100) { clearInterval(interval); } return () => clearInterval(interval); }, [percent]); return (
} /> Description can be used to further elaborate on the validation step, or give the user a better idea of how long the process will take.
); }; export const WizardFinished: React.FunctionComponent = () => { const closeWizard = () => { // eslint-disable-next-line no-console console.log('close wizard'); }; const steps = [ { name: 'First step', component:

Step 1 content

}, { name: 'Second step', component:

Step 2 content

}, { name: 'Third step', component:

Step 3 content

}, { name: 'Fourth step', component:

Step 4 content

}, { name: 'Review', component:

Review step content

, nextButtonText: 'Finish' }, { name: 'Finish', component: , isFinishedStep: true } ]; const title = 'Finished wizard example'; return ( ); };