change style for list
[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 { RecentQueriesItem } from '~/views-components/search-bar/search-bar-view';
9 import { ArvadosTheme } from '~/common/custom-theme';
10
11 type CssRules = 'list';
12
13 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
14     list: {
15         padding: 0
16     }
17 });
18
19 interface SearchBarAdvancedViewProps {
20     setView: (currentView: string) => void;
21 }
22
23 export const SearchBarAdvancedView = withStyles(styles)(
24     ({ classes, setView }: SearchBarAdvancedViewProps & WithStyles<CssRules>) =>
25         <Paper>
26             <List component="nav" className={classes.list}>
27                 <RecentQueriesItem text='ADVANCED VIEW' />
28             </List>
29             <Button onClick={() => setView(SearchView.BASIC)}>Back</Button>
30         </Paper>
31 );