import { ReactNodeArray } from 'prop-types';
import classNames from 'classnames';
-type CssRules = 'button' | 'buttonIcon' | 'content';
+type CssRules = 'root' | 'button' | 'buttonIcon' | 'content';
const styles: StyleRulesCallback<CssRules> = theme => ({
+ root: {
+ marginTop: '10px',
+ },
button: {
padding: '2px 5px',
marginRight: '5px',
panelRef?: MutableRefObject<any>;
forwardProps?: boolean;
maxHeight?: string;
+ minHeight?: string;
}
interface MPVPanelActionProps {
// Grid item compatible component for layout and MPV props passing
export const MPVPanelContent = ({doHidePanel, doMaximizePanel, doUnMaximizePanel, panelName,
- panelMaximized, panelIlluminated, panelRef, forwardProps, maxHeight,
+ panelMaximized, panelIlluminated, panelRef, forwardProps, maxHeight, minHeight,
...props}: MPVPanelContentProps) => {
useEffect(() => {
if (panelRef && panelRef.current) {
}
}, [panelRef]);
- const mh = panelMaximized
+ const maxH = panelMaximized
? '100%'
: maxHeight;
- return <Grid item style={{maxHeight: mh}} {...props}>
+ return <Grid item style={{maxHeight: maxH, minHeight}} {...props}>
<span ref={panelRef} /> {/* Element to scroll to when the panel is selected */}
<Paper style={{height: '100%'}} elevation={panelIlluminated ? 8 : 0}>
{ forwardProps
};
};
- return <Grid container {...props}>
+ return <Grid container {...props} className={classes.root}>
<Grid container item direction="row">
{ buttons.map((tgl, idx) => <Grid item key={idx}>{tgl}</Grid>) }
</Grid>
</Grid>;
};
-export const MPVContainer = withStyles(styles)(MPVContainerComponent);
\ No newline at end of file
+export const MPVContainer = withStyles(styles)(MPVContainerComponent);