Skip to content

Commit

Permalink
Failing case
Browse files Browse the repository at this point in the history
  • Loading branch information
cefn committed Jun 1, 2021
1 parent 04c4c7b commit 25703fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Controls.tsx
Expand Up @@ -5,7 +5,7 @@ import type { AppState } from '../types'
import { DetailRadio } from './controls/DetailRadio'
import { LengthSlider } from './controls/LengthSlider'
import { PriorityList } from './controls/PriorityList'
import { DownloadButton, SourceButton } from './controls/Buttons'
import { DownloadButton, SourceButton, ResetButton } from './controls/Buttons'

export const Controls: FC<{ store: Store<AppState> }> = ({ store }) => (
<div style={{ display: 'flex', flexDirection: 'column' }}>
Expand All @@ -18,6 +18,7 @@ export const Controls: FC<{ store: Store<AppState> }> = ({ store }) => (
<Grid container direction="column" spacing={3}>
<DownloadButton store={store} />
<SourceButton />
<ResetButton store={store} />
</Grid>
</Grid>
</Grid>
Expand Down
7 changes: 7 additions & 0 deletions src/components/controls/Buttons.tsx
Expand Up @@ -3,6 +3,7 @@ import { Button } from '@material-ui/core'
import { Store } from '@lauf/lauf-store'
import type { AppState } from '../../types'
import { downloadPdf } from '../../util'
import { INITIAL_APPSTATE } from '../../logic'

const BUTTON_DEFAULTS = {
variant: 'contained',
Expand All @@ -23,6 +24,12 @@ export const DownloadButton: FC<{ store: Store<AppState> }> = ({ store }) => (
</>
)

export const ResetButton: FC<{ store: Store<AppState> }> = ({ store }) => (
<Button {...BUTTON_DEFAULTS} onClick={() => store.write(INITIAL_APPSTATE)}>
Reset
</Button>
)

export const SourceButton: FC = () => (
<Button {...BUTTON_DEFAULTS} href="https://github.com/cefn/cvnext">
About
Expand Down

0 comments on commit 25703fc

Please sign in to comment.