From ace9e7498d3aa390b72a554517cb09d056b95abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”> Date: Tue, 30 Aug 2022 16:19:43 +0300 Subject: [PATCH] Edited container - wideclass condition has been added --- src/components/Container.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/Container.tsx b/src/components/Container.tsx index 9581476..f0f2c67 100644 --- a/src/components/Container.tsx +++ b/src/components/Container.tsx @@ -5,19 +5,24 @@ type Props = { * Content of component */ children: React.ReactNode; + /** + * Display variants of container + */ + variant?: "straight" | "wide"; /** * Component styling */ className?: string; -} & Omit, ""> +}; /** * Main container to handle page content max-width on * different screen sizes */ -export default function Container({children, className}: Props) { +export default function Container({ children, variant, className }: Props) { + const wideClass = variant == "straight" ? "container" : "container-wide"; return ( -
+
{children}
- ) + ); }