mirador
Version:
An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
60 lines (58 loc) • 1.8 kB
JavaScript
import { compose } from 'redux';
import { withTranslation } from 'react-i18next';
import { withStyles } from '@material-ui/core/styles';
import { fade } from '@material-ui/core/styles/colorManipulator';
import { withPlugins } from '../extend/withPlugins';
import { WindowAuthenticationBar } from '../components/WindowAuthenticationBar';
/**
* @param theme
* @returns {{typographyBody: {flexGrow: number, fontSize: number|string},
* windowTopBarStyle: {minHeight: number, paddingLeft: number, backgroundColor: string}}}
*/
var styles = function styles(theme) {
return {
buttonInvert: {
'&:hover': {
backgroundColor: fade(theme.palette.secondary.contrastText, 1 - theme.palette.action.hoverOpacity)
},
backgroundColor: theme.palette.secondary.contrastText,
marginLeft: theme.spacing(5),
paddingBottom: 0,
paddingTop: 0
},
expanded: {
paddingLeft: theme.spacing(),
paddingRight: theme.spacing()
},
failure: {
backgroundColor: theme.palette.error.dark
},
fauxButton: {
marginLeft: theme.spacing(2.5)
},
icon: {
marginRight: theme.spacing(1.5),
verticalAlign: 'text-bottom'
},
label: {
lineHeight: 2.25
},
paper: {
backgroundColor: theme.palette.secondary.main,
color: theme.palette.secondary.contrastText,
cursor: 'pointer'
},
topBar: {
'&:hover': {
backgroundColor: theme.palette.secondary.main
},
alignItems: 'center',
display: 'flex',
justifyContent: 'inherit',
padding: theme.spacing(1),
textTransform: 'none'
}
};
};
var enhance = compose(withTranslation(), withStyles(styles), withPlugins('WindowAuthenticationBar'));
export default enhance(WindowAuthenticationBar);