Skip to content

Feature/on reset #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 12, 2020
Prev Previous commit
Next Next commit
add footer button styles, temp hide reset
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Jul 12, 2020
commit a1a661f9bb82db9852c0a39d35f59b8b3139f3d9
3 changes: 2 additions & 1 deletion web-app/src/containers/Tutorial/components/Reset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Button from '../../../components/Button'
import Markdown from '../../../components/Markdown'

interface Props {
disabled: boolean
onReset(): void
}

Expand All @@ -24,7 +25,7 @@ const Reset = (props: Props) => {

return (
<>
<Button type="secondary" onClick={() => setModalState('confirm')}>
<Button type="secondary" onClick={() => setModalState('confirm')} disabled={props.disabled}>
Reset
</Button>
<Dialog
Expand Down
20 changes: 10 additions & 10 deletions web-app/src/containers/Tutorial/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,21 @@ const TutorialPage = (props: PageProps) => {
</div>
)}
{/* Left */}
{DISPLAY_RUN_TEST_BUTTON && level.status !== 'COMPLETE' ? (
<Button style={{ marginLeft: '1rem' }} type="primary" onClick={onRunTest} disabled={processes.length > 0}>
Run
</Button>
) : (
<div />
)}
<div css={{ flex: 1 }}>
{DISPLAY_RUN_TEST_BUTTON && level.status !== 'COMPLETE' ? (
<Button style={{ marginLeft: '1rem' }} type="primary" onClick={onRunTest} disabled={processes.length > 0}>
Run
</Button>
) : null}
</div>

{/* Center */}
<div style={{}}>
<Reset onReset={onReset} />
<div css={{ flex: 1, display: 'flex', justifyContent: 'center' }}>
{/* <Reset onReset={onReset} disabled={processes.length > 0} /> */}
</div>

{/* Right */}
<div>
<div css={{ flex: 1, display: 'flex', justifyContent: 'flex-end' }}>
{level.status === 'COMPLETE' || !level.steps.length ? (
<Button style={{ marginRight: '1rem' }} type="primary" onClick={onContinue}>
Continue
Expand Down