Merge branch 'master' of git.curoverse.com:arvados-workbench2 into 14307-search-basic...
[arvados.git] / src / views-components / search-bar / search-bar-advanced-view.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 { Paper, StyleRulesCallback, withStyles, WithStyles, List, Button } from '@material-ui/core';
7 import { SearchView } from '~/store/search-bar/search-bar-reducer';
8 import { RenderRecentQueries } from '~/views-components/search-bar/search-bar-view';
9
10 type CssRules = 'list';
11
12 const styles: StyleRulesCallback<CssRules> = theme => {
13     return {
14         list: {
15             padding: '0px'
16         }
17     };
18 };
19
20 interface SearchBarAdvancedViewProps {
21     setView: (currentView: string) => void;
22 }
23
24 export const SearchBarAdvancedView = withStyles(styles)(
25     ({ classes, setView }: SearchBarAdvancedViewProps & WithStyles<CssRules>) =>
26         <Paper>
27             <List component="nav" className={classes.list}>
28                 <RenderRecentQueries text='ADVANCED VIEW' />
29             </List>
30             <Button onClick={() => setView(SearchView.BASIC)}>Back</Button>
31         </Paper>
32 );