From: Daniel Kos Date: Mon, 1 Oct 2018 19:44:55 +0000 (+0200) Subject: Fix invalid search icon position X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/7299f093d4325802cbabf89c0b4861768b19b472 Fix invalid search icon position Bug #14265 Arvados-DCO-1.1-Signed-off-by: Daniel Kos --- diff --git a/src/components/search-bar/search-bar.tsx b/src/components/search-bar/search-bar.tsx index f01b5692f2..366d70563e 100644 --- a/src/components/search-bar/search-bar.tsx +++ b/src/components/search-bar/search-bar.tsx @@ -3,10 +3,18 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { IconButton, Paper, StyleRulesCallback, withStyles, WithStyles, Tooltip } from '@material-ui/core'; +import { + IconButton, + Paper, + StyleRulesCallback, + withStyles, + WithStyles, + Tooltip, + InputAdornment, Input +} from '@material-ui/core'; import SearchIcon from '@material-ui/icons/Search'; -type CssRules = 'container' | 'input' | 'button'; +type CssRules = 'container' | 'input'; const styles: StyleRulesCallback = theme => { return { @@ -17,17 +25,7 @@ const styles: StyleRulesCallback = theme => { input: { border: 'none', borderRadius: theme.spacing.unit / 4, - boxSizing: 'border-box', - padding: theme.spacing.unit, - paddingRight: theme.spacing.unit * 4, - width: '100%', - }, - button: { - position: 'absolute', - top: theme.spacing.unit / 2, - right: theme.spacing.unit / 2, - width: theme.spacing.unit * 3, - height: theme.spacing.unit * 3 + padding: `${theme.spacing.unit / 2}px ${theme.spacing.unit}px` } }; }; @@ -61,17 +59,22 @@ export const SearchBar = withStyles(styles)( const { classes } = this.props; return
- - - - - - + fullWidth={true} + disableUnderline={true} + endAdornment={ + + + + + + + + }/>
; }