2021-07-21 08:59:52 +00:00
|
|
|
import { makeStyles } from "@saleor/macaw-ui";
|
2022-12-02 10:45:19 +00:00
|
|
|
import clsx from "clsx";
|
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",
|
2022-06-21 09:36:55 +00:00
|
|
|
maxWidth: theme.breakpoints.width("lg"),
|
2019-11-12 16:28:21 +00:00
|
|
|
},
|
|
|
|
[theme.breakpoints.up("sm")]: {
|
2022-06-21 09:36:55 +00:00
|
|
|
padding: theme.spacing(0, 3),
|
2019-11-12 16:28:21 +00:00
|
|
|
},
|
2022-02-21 11:38:27 +00:00
|
|
|
padding: theme.spacing(0, 1),
|
2022-06-21 09:36:55 +00:00
|
|
|
position: "relative",
|
|
|
|
},
|
2019-11-12 16:28:21 +00:00
|
|
|
}),
|
|
|
|
{
|
2022-06-21 09:36:55 +00:00
|
|
|
name: "Container",
|
|
|
|
},
|
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);
|
|
|
|
|
2022-12-02 10:45:19 +00:00
|
|
|
return <div className={clsx(classes.root, className)} {...rest} />;
|
2019-10-30 14:34:24 +00:00
|
|
|
};
|
2019-06-19 14:40:52 +00:00
|
|
|
Container.displayName = "Container";
|
|
|
|
export default Container;
|