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.
Implement cluster wizard steps sidebar according to the wireframes
- Loading branch information
Jiri Tomasek
committed
Feb 14, 2019
1 parent
d049a44
commit 04e7435
Showing
5 changed files
with
58 additions
and
64 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,45 @@ | ||
import React, { FC } from 'react'; | ||
import { List, PageSectionVariants } from '@patternfly/react-core'; | ||
import ClusterWizardStep from './ClusterWizardStep'; | ||
|
||
import PageSection from './ui/PageSection'; | ||
|
||
interface ClusterWizardStep { | ||
title: string; | ||
} | ||
import { Nav, NavList, NavItem } from '@patternfly/react-core'; | ||
|
||
interface ClusterWizardStepsProps { | ||
steps: ClusterWizardStep[]; | ||
currentStepIndex: number; | ||
} | ||
|
||
const ClusterWizardSteps: FC<ClusterWizardStepsProps> = ({ | ||
steps, | ||
currentStepIndex | ||
}: 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={currentStepIndex === 0} | ||
> | ||
1. Cluster setup | ||
</NavItem> | ||
<NavItem | ||
id="cluster-wizard-steps-add-hosts" | ||
to="#" | ||
itemId={1} | ||
isActive={currentStepIndex === 1} | ||
> | ||
2. Add hosts | ||
</NavItem> | ||
<NavItem | ||
id="cluster-wizard-steps-results" | ||
to="#" | ||
itemId={2} | ||
isActive={currentStepIndex === 2} | ||
> | ||
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