Skip to content

Commit 2cbd1e6

Browse files
#384 add layout of up/down arrows
1 parent c561989 commit 2cbd1e6

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

js/components/preview/molecule/moleculeView.js

+25-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import React, { memo, useEffect, useState, useRef, useContext, useCallback } from 'react';
66
import { useDispatch, useSelector } from 'react-redux';
77
import { Grid, Button, makeStyles, Typography, Tooltip, IconButton } from '@material-ui/core';
8-
import { MyLocation } from '@material-ui/icons';
8+
import { MyLocation, ArrowDownward, ArrowUpward } from '@material-ui/icons';
99
import SVGInline from 'react-svg-inline';
1010
import classNames from 'classnames';
1111
import { VIEWS } from '../../../constants/constants';
@@ -156,6 +156,13 @@ const useStyles = makeStyles(theme => ({
156156
borderStyle: 'none',
157157
borderColor: theme.palette.white
158158
}
159+
},
160+
arrows: {
161+
height: '100%'
162+
},
163+
arrow: {
164+
width: 12,
165+
height: 15
159166
}
160167
}));
161168

@@ -478,7 +485,6 @@ const MoleculeView = memo(({ imageHeight, imageWidth, data, searchMoleculeGroup,
478485
<div className={classes.moleculeTitleLabel}>{moleculeTitle}</div>
479486
</Tooltip>
480487
</Grid>
481-
482488
{/* Control Buttons A, L, C, V */}
483489
<Grid item xs={5}>
484490
<Grid
@@ -645,6 +651,23 @@ const MoleculeView = memo(({ imageHeight, imageWidth, data, searchMoleculeGroup,
645651
</Grid>
646652
</Grid>
647653
</Grid>
654+
{/* Up/Down arrows */}
655+
<Grid item>
656+
<Grid container direction="column" justify="space-between" className={classes.arrows}>
657+
<Grid item>
658+
<Tooltip title="secondary">
659+
<IconButton color="primary" size="small" disabled={disableUserInteraction}>
660+
<ArrowUpward className={classes.arrow} />
661+
</IconButton>
662+
</Tooltip>
663+
</Grid>
664+
<Grid item>
665+
<IconButton color="primary" size="small" disabled={disableUserInteraction}>
666+
<ArrowDownward className={classes.arrow} />
667+
</IconButton>
668+
</Grid>
669+
</Grid>
670+
</Grid>
648671
{/* Image */}
649672
<Grid
650673
item

0 commit comments

Comments
 (0)