feat: add custom Container component for layouts

This commit is contained in:
enes 2024-07-29 11:20:39 +02:00
parent 2cd851a7c1
commit e54eced800
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,24 @@
import { CSSProperties, PropsWithChildren } from 'react'
import defaultStyle from './style.module.scss'
interface ContainerProps {
style?: CSSProperties
className?: string
}
export const Container = ({
style = {},
className = '',
children
}: PropsWithChildren<ContainerProps>) => {
return (
<div
style={{
...style
}}
className={`${defaultStyle.container} ${className}`}
>
{children}
</div>
)
}

View File

@ -0,0 +1,6 @@
.container {
width: 100%;
max-width: 1400px;
padding-inline: 10px;
margin-inline: auto;
}