Skip to content

Commit

Permalink
#67 modified filter select and "Hit navigator" styling
Browse files Browse the repository at this point in the history
  • Loading branch information
matej-vavrek committed Mar 13, 2020
1 parent 9d471a3 commit 4b6a9ef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions js/components/common/Surfaces/Panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ export const Panel = memo(
className={classes.headerGrid}
>
{title && (
<Grid item xs={hasExpansion || headerActions ? 6 : 12} className={classes.headerTitle}>
<Grid item xs={hasExpansion || headerActions ? 4 : 12} className={classes.headerTitle}>
<Typography variant="h6" color="inherit" noWrap>
{title}
</Typography>
</Grid>
)}
{(headerActions || hasExpansion) && (
<Grid item container direction="row" justify="flex-end" xs={title ? 6 : 12}>
<Grid item container direction="row" justify="flex-end" xs={title ? 8 : 12}>
{headerActions &&
headerActions.map((action, index) => (
<Grid item key={index}>
Expand Down
27 changes: 19 additions & 8 deletions js/components/preview/molecule/moleculeList.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,21 @@ const useStyles = makeStyles(theme => ({
minWidth: 87,
fontSize: '1.2rem'
},
colorInherit: {
color: 'inherit'
select: {
color: 'inherit',
fill: 'inherit',
'&:hover:not(.Mui-disabled):before': {
borderColor: 'inherit'
},
'&:before': {
borderColor: 'inherit'
},
'&:not(.Mui-disabled)': {
fill: theme.palette.white
}
},
selectIcon: {
fill: 'inherit'
},
molHeader: {
marginLeft: 19,
Expand Down Expand Up @@ -152,7 +165,6 @@ const MoleculeList = memo(

const isActiveFilter = !!(filterSettings || {}).active;

const dispatch = useDispatch();
const { getNglView } = useContext(NglContext);
const stage = getNglView(VIEWS.MAJOR_VIEW) && getNglView(VIEWS.MAJOR_VIEW).stage;

Expand Down Expand Up @@ -181,9 +193,7 @@ const MoleculeList = memo(
setOldUrl: url => setOldUrl(url),
old_url: oldUrl.current,
list_type,
setObjectList: moleculeList => {
setMoleculeList(moleculeList);
},
setObjectList: setMoleculeList,
setCachedMolLists,
mol_group_on,
cached_mol_lists
Expand Down Expand Up @@ -257,12 +267,13 @@ const MoleculeList = memo(
headerActions={[
<FormControl className={classes.formControl} disabled={!(object_selection || []).length}>
<Select
className={classes.colorInherit}
className={classes.select}
value={predefinedFilter}
onChange={changePredefinedFilter}
inputProps={{
name: 'predefined',
id: 'predefined-label-placeholder'
id: 'predefined-label-placeholder',
classes: { icon: classes.selectIcon }
}}
displayEmpty
name="predefined"
Expand Down

0 comments on commit 4b6a9ef

Please sign in to comment.