This repository has been archived by the owner on Apr 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from jtomasek/clusterWizardSteps
Cluster wizard steps
- Loading branch information
Showing
6 changed files
with
72 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,47 @@ | ||
import React, { FC } from 'react'; | ||
import { List, PageSectionVariants } from '@patternfly/react-core'; | ||
import ClusterWizardStep from './ClusterWizardStep'; | ||
import { Nav, NavList, NavItem } from '@patternfly/react-core'; | ||
|
||
import PageSection from './ui/PageSection'; | ||
|
||
interface ClusterWizardStep { | ||
title: string; | ||
} | ||
import { WizardStep } from '../models/wizardStep'; | ||
|
||
interface ClusterWizardStepsProps { | ||
steps: ClusterWizardStep[]; | ||
currentStepIndex: number; | ||
currentStep: WizardStep; | ||
} | ||
|
||
const ClusterWizardSteps: FC<ClusterWizardStepsProps> = ({ | ||
steps, | ||
currentStepIndex | ||
currentStep | ||
}: ClusterWizardStepsProps): JSX.Element => ( | ||
<PageSection variant={PageSectionVariants.light}> | ||
<List variant="inline"> | ||
{steps.map((step, index) => ( | ||
<ClusterWizardStep | ||
key={index} | ||
index={index} | ||
currentStepIndex={currentStepIndex} | ||
{...step} | ||
/> | ||
))} | ||
</List> | ||
</PageSection> | ||
<Nav | ||
onToggle={() => {}} | ||
onSelect={() => {}} | ||
aria-label="Cluster deployment wizard steps" | ||
> | ||
<NavList> | ||
<NavItem | ||
id="cluster-wizard-steps-cluster-setup" | ||
to="#" | ||
itemId={0} | ||
isActive={currentStep === WizardStep.ClusterSetup} | ||
> | ||
1. Cluster setup | ||
</NavItem> | ||
<NavItem | ||
id="cluster-wizard-steps-add-hosts" | ||
to="#" | ||
itemId={1} | ||
isActive={currentStep === WizardStep.AddHosts} | ||
> | ||
2. Add hosts | ||
</NavItem> | ||
<NavItem | ||
id="cluster-wizard-steps-results" | ||
to="#" | ||
itemId={2} | ||
isActive={currentStep === WizardStep.Results} | ||
> | ||
3. Results | ||
</NavItem> | ||
</NavList> | ||
</Nav> | ||
); | ||
|
||
export default ClusterWizardSteps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export enum WizardStep { | ||
ClusterSetup, | ||
AddHosts, | ||
Results | ||
} |