Container: support flexbox directives.

master
Tom Hacohen 4 years ago
parent cb35557565
commit 2a43a9e94e

@ -6,12 +6,17 @@ import Paper from "@material-ui/core/Paper";
import "./Container.css"; import "./Container.css";
export default (props: {style?: any, children: any}) => ( export default (props: {style?: React.CSSProperties, children: any}) => {
const display = props.style?.display;
const flexDirection = props.style?.flexDirection;
return (
<div className="Container" style={props.style}> <div className="Container" style={props.style}>
<Paper elevation={3}> <Paper elevation={3} style={{ display, flexDirection, flexGrow: 1 }}>
<div className="Container-inner"> <div className="Container-inner" style={{ display, flexDirection, flexGrow: 1 }}>
{props.children} {props.children}
</div> </div>
</Paper> </Paper>
</div> </div>
); );
};

Loading…
Cancel
Save