From f9c7cd4194c558a15a731bcd99edb63be01196c5 Mon Sep 17 00:00:00 2001 From: Sebas <36385457+ZEBAS204@users.noreply.github.com> Date: Sun, 26 Mar 2023 21:32:43 -0300 Subject: [PATCH] Pass props directory to clock --- src/components/timer/Clock.jsx | 6 +++++- src/components/timer/CountDown.jsx | 12 ++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/components/timer/Clock.jsx b/src/components/timer/Clock.jsx index f5a4e0a..e65d005 100644 --- a/src/components/timer/Clock.jsx +++ b/src/components/timer/Clock.jsx @@ -1,8 +1,12 @@ import { Text } from '@chakra-ui/react' -export default function wClock({ remainingtimeToDisplay = '00:00:00' }) { +export default function wClock({ + remainingtimeToDisplay = '00:00:00', + ...rest +}) { return ( ( ) -export default function CountDown({ - parentRunning = false, - remainingtimeToDisplay, -}) { +export default function CountDown({ parentRunning = false, ...clockProps }) { const { t } = useTranslation() const { toggleRunning, sendReset } = useTimerContext() const [isPickerVisible, setPickerVisible] = useState(false) @@ -52,7 +49,6 @@ export default function CountDown({ <> - {isPickerVisible ? ( - - ) : ( - - )} + {isPickerVisible ? : }