From 340613db655c35a344654619305b113c108e147d Mon Sep 17 00:00:00 2001 From: Pavel Klibani Date: Tue, 12 Sep 2023 11:32:20 +0200 Subject: [PATCH] Docs(web-react): Add hasStack and stackAlignment to DocsSection comp Add same props and functionality as in the web-twig component. --- packages/web-react/docs/DocsSections.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/web-react/docs/DocsSections.tsx b/packages/web-react/docs/DocsSections.tsx index 18660fa83b..bdc627dce7 100644 --- a/packages/web-react/docs/DocsSections.tsx +++ b/packages/web-react/docs/DocsSections.tsx @@ -3,11 +3,13 @@ import { Tag } from '../src/components'; interface DocsSectionProps { children: ReactNode; + hasStack?: boolean; + stackAlignment?: 'start' | 'center' | 'end'; tag?: string; title: string; } -const DocsSection = ({ children, title, tag }: DocsSectionProps) => ( +const DocsSection = ({ children, hasStack = true, stackAlignment = 'start', title, tag }: DocsSectionProps) => (

{title} @@ -17,11 +19,13 @@ const DocsSection = ({ children, title, tag }: DocsSectionProps) => ( )}

- {children} + {hasStack ?
{children}
: children}
); DocsSection.defaultProps = { + hasStack: true, + stackAlignment: 'start', tag: '', };