From e219707d2ef99a6c0ef2e197e0a27c8b99f18b8d Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Thu, 11 Jan 2024 11:09:30 +0200 Subject: [PATCH] feat: create responsive stack component --- src/components/General/ResponsiveStack.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/components/General/ResponsiveStack.tsx diff --git a/src/components/General/ResponsiveStack.tsx b/src/components/General/ResponsiveStack.tsx new file mode 100644 index 00000000..3e79c6ad --- /dev/null +++ b/src/components/General/ResponsiveStack.tsx @@ -0,0 +1,19 @@ +import { CSSProperties, ReactNode } from 'react' +import { XStack, YStack } from 'tamagui' + +type ResponsiveStackProps = { + isVerticalAligned?: boolean + children: ReactNode + space?: string + style?: CSSProperties +} + +const ResponsiveStack = ({ isVerticalAligned, children, space, style }: ResponsiveStackProps) => { + if (isVerticalAligned) { + return {children} + } + + return {children} +} + +export default ResponsiveStack