2021-07-21 08:59:52 +00:00
|
|
|
import { makeStyles } from "@saleor/macaw-ui";
|
2019-08-09 11:14:35 +00:00
|
|
|
import classNames from "classnames";
|
2019-08-09 10:26:22 +00:00
|
|
|
import React from "react";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
2019-11-12 16:28:21 +00:00
|
|
|
const useStyles = makeStyles(
|
|
|
|
theme => ({
|
|
|
|
root: {
|
|
|
|
[theme.breakpoints.up("lg")]: {
|
|
|
|
marginLeft: "auto",
|
|
|
|
marginRight: "auto",
|
|
|
|
maxWidth: theme.breakpoints.width("lg")
|
|
|
|
},
|
|
|
|
[theme.breakpoints.up("sm")]: {
|
|
|
|
padding: theme.spacing(0, 3)
|
|
|
|
},
|
|
|
|
padding: theme.spacing(0, 1)
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
{
|
|
|
|
name: "Container"
|
2019-10-30 14:34:24 +00:00
|
|
|
}
|
2019-11-12 16:28:21 +00:00
|
|
|
);
|
2019-06-19 14:40:52 +00:00
|
|
|
|
2019-10-30 14:34:24 +00:00
|
|
|
interface ContainerProps {
|
2019-06-19 14:40:52 +00:00
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
2019-10-30 14:34:24 +00:00
|
|
|
export const Container: React.FC<ContainerProps> = props => {
|
|
|
|
const { className, ...rest } = props;
|
|
|
|
|
|
|
|
const classes = useStyles(props);
|
|
|
|
|
|
|
|
return <div className={classNames(classes.root, className)} {...rest} />;
|
|
|
|
};
|
2019-06-19 14:40:52 +00:00
|
|
|
Container.displayName = "Container";
|
|
|
|
export default Container;
|