Merge branch '14225-prepare-structure-and-init-stepper'
[arvados-workbench2.git] / src / views / run-process-panel / run-process-panel-root.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import * as React from 'react';
6 import { Stepper, Step, StepLabel, StepContent, Button } from '@material-ui/core';
7
8 export interface RunProcessPanelRootDataProps {
9     currentStep: number;
10 }
11
12 export interface RunProcessPanelRootActionProps {
13     onSetStep: (step: number) => void;
14 }
15
16 type RunProcessPanelRootProps = RunProcessPanelRootDataProps & RunProcessPanelRootActionProps;
17
18 export const RunProcessPanelRoot = ({ currentStep, onSetStep, ...props }: RunProcessPanelRootProps) =>
19     <Stepper activeStep={currentStep} orientation="vertical" elevation={2}>
20         <Step>
21             <StepLabel>Choose a workflow</StepLabel>
22             <StepContent>
23                 <Button variant="contained" color="primary" onClick={() => onSetStep(1)}>
24                     Next
25                 </Button>
26             </StepContent>
27         </Step>
28         <Step>
29             <StepLabel>Select inputs</StepLabel>
30             <StepContent>
31                 <Button color="primary" onClick={() => onSetStep(0)}>
32                     Back
33                 </Button>
34                 <Button variant="contained" color="primary">
35                     Run Process
36                 </Button>
37             </StepContent>
38         </Step>
39     </Stepper>;