Files
AIRegulation-Demo-Test/src/components/layout/Content.tsx
2026-05-06 17:43:39 +08:00

27 lines
559 B
TypeScript

import React from 'react';
import { useTheme } from '../../contexts/ThemeContext';
interface ContentProps {
children: React.ReactNode;
wide?: boolean;
}
export const Content: React.FC<ContentProps> = ({ children, wide = false }) => {
const { theme } = useTheme();
return (
<main
style={{
flex: 1,
padding: '48px 56px',
maxWidth: wide ? 1400 : 1100,
margin: '0 auto',
width: '100%',
position: 'relative',
backgroundColor: theme.bg,
}}
>
{children}
</main>
);
};