-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
130 additions
and
93 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
File renamed without changes.
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,35 @@ | ||
import {Tabs} from 'antd'; | ||
import {IWizardStep} from 'types/Wizard.types'; | ||
import * as S from './Content.styled'; | ||
import Tab from './Tab'; | ||
|
||
interface IProps { | ||
activeStepId: string; | ||
steps: IWizardStep[]; | ||
onChange(key: string): void; | ||
} | ||
|
||
const Content = ({activeStepId, steps, onChange}: IProps) => ( | ||
<S.Container> | ||
<Tabs | ||
type="card" | ||
activeKey={activeStepId} | ||
tabPosition="left" | ||
onTabClick={(key, event) => { | ||
event.preventDefault(); | ||
onChange(key); | ||
}} | ||
> | ||
{steps.map((step, index) => { | ||
const {component: Component, id} = step; | ||
return ( | ||
<Tabs.TabPane tab={<Tab index={index + 1} isActive={id === activeStepId} step={step} />} key={id}> | ||
<Component /> | ||
</Tabs.TabPane> | ||
); | ||
})} | ||
</Tabs> | ||
</S.Container> | ||
); | ||
|
||
export default Content; |
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
2 changes: 1 addition & 1 deletion
2
web/src/components/Wizard/Steps/index.ts → web/src/components/Wizard/Content/index.ts
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,2 +1,2 @@ | ||
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './Steps'; | ||
export {default} from './Content'; |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.div``; |
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,9 @@ | ||
const RunTest = () => { | ||
return ( | ||
<div> | ||
<h1>Create Test</h1> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RunTest; |
2 changes: 1 addition & 1 deletion
2
...rc/components/Wizard/StepFactory/index.ts → .../components/Wizard/Steps/RunTest/index.ts
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,2 +1,2 @@ | ||
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './StepFactory'; | ||
export {default} from './RuntTest'; |
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
web/src/components/Wizard/Steps/TracingBackend/TracingBackend.styled.ts
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,3 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.div``; |
9 changes: 9 additions & 0 deletions
9
web/src/components/Wizard/Steps/TracingBackend/TracingBackend.tsx
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,9 @@ | ||
const TracingBackend = () => { | ||
return ( | ||
<div> | ||
<h1>Tracing Backend</h1> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TracingBackend; |
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,2 @@ | ||
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './TracingBackend'; |
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,35 @@ | ||
import {useMemo} from 'react'; | ||
import {IWizardStep} from 'types/Wizard.types'; | ||
import WizardProvider from 'providers/Wizard/Wizard.provider'; | ||
import TracingBackend from '../Steps/TracingBackend/TracingBackend'; | ||
import RunTest from '../Steps/RunTest'; | ||
|
||
interface IProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const Wrapper = ({children}: IProps) => { | ||
const steps = useMemo<IWizardStep[]>( | ||
() => [ | ||
{ | ||
id: 'tracing-backend', | ||
name: 'Setup your Tracing Backend', | ||
description: '', | ||
component: TracingBackend, | ||
status: 'pending', // grab status from somewhere else | ||
}, | ||
{ | ||
id: 'run-test', | ||
name: 'Run your first test', | ||
description: '', | ||
component: RunTest, | ||
status: 'pending', | ||
}, | ||
], | ||
[] | ||
); | ||
|
||
return <WizardProvider steps={steps}>{children}</WizardProvider>; | ||
}; | ||
|
||
export default Wrapper; |
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,2 @@ | ||
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './Wrapper'; |
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 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