From 2bb7a5e52072a3e70c0b8671a2995502bb1d59cd Mon Sep 17 00:00:00 2001 From: mini-mirana Date: Wed, 23 Mar 2022 15:28:39 +0100 Subject: [PATCH] feat(components): :sparkles: Add reverse feature --- src/components/Stack/index.jsx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/components/Stack/index.jsx b/src/components/Stack/index.jsx index 77305cd..897e355 100644 --- a/src/components/Stack/index.jsx +++ b/src/components/Stack/index.jsx @@ -11,7 +11,16 @@ import { Text } from '../Text' const AnimatedText = animated(Text) -export function Stack({ dom = null, reverse = true, width = 6, height = 4, distance = 8, content = [] }) { +export function Stack({ + dom = null, + width = 6, + height = 4, + startZ = undefined, + distance = 8, + reverse = false, + startReverse = false, + content = [] +}) { const { size } = useThree() const [vpWidth, vpHeight] = useAspect(size.width, size.height) @@ -55,14 +64,15 @@ export function Stack({ dom = null, reverse = true, width = 6, height = 4, dista return ( <> {newContent.map((c, i) => ( - + + justifyContent='center'> {c.type === 'text' && (