Container

Custom container decraration is inside src/components/Container.js

import React from 'react';
import PropTypes from 'prop-types';
import Box from '@mui/material/Box';

const Container = ({ children, ...rest }) => (
  <Box
    maxWidth={{ sm: 720, md: 1236 }}
    width={1}
    margin={'0 auto'}
    paddingX={2}
    paddingY={{ xs: 4, sm: 6, md: 8 }}
    {...rest}
  >
    {children}
  </Box>
);

Container.propTypes = {
  children: PropTypes.node.isRequired,
};

export default Container;

Example of the Container component

The custom container is an alternative of MUI Container Component. You are free to replace the Container which is coming with the theme with MUI Container

This is custom Container with custom width and padding.

© 2019-2024 飞风公司 版权所有

当您访问我们的网站、服务或工具或与之互动时,我们或我们的授权服务提供商可能会使用cookie来存储信息,以帮助您提供更好、更快、更安全的体验,并用于营销目的。