From e54eced800305c1e724b846c9fbff4cf97f77414 Mon Sep 17 00:00:00 2001 From: enes Date: Mon, 29 Jul 2024 11:20:39 +0200 Subject: [PATCH] feat: add custom Container component for layouts --- src/components/Container/index.tsx | 24 ++++++++++++++++++++++ src/components/Container/style.module.scss | 6 ++++++ 2 files changed, 30 insertions(+) create mode 100644 src/components/Container/index.tsx create mode 100644 src/components/Container/style.module.scss diff --git a/src/components/Container/index.tsx b/src/components/Container/index.tsx new file mode 100644 index 0000000..57857b9 --- /dev/null +++ b/src/components/Container/index.tsx @@ -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) => { + return ( +
+ {children} +
+ ) +} diff --git a/src/components/Container/style.module.scss b/src/components/Container/style.module.scss new file mode 100644 index 0000000..b431d3c --- /dev/null +++ b/src/components/Container/style.module.scss @@ -0,0 +1,6 @@ +.container { + width: 100%; + max-width: 1400px; + padding-inline: 10px; + margin-inline: auto; +}