From ce4edb917ea4806aa062064faf4dec6a9a8dc8e0 Mon Sep 17 00:00:00 2001 From: chedieck Date: Wed, 22 May 2024 15:03:11 -0300 Subject: [PATCH] fix: don't forward boolean props --- react/lib/components/Widget/Widget.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/react/lib/components/Widget/Widget.tsx b/react/lib/components/Widget/Widget.tsx index cdfbcd25..b140cbc5 100644 --- a/react/lib/components/Widget/Widget.tsx +++ b/react/lib/components/Widget/Widget.tsx @@ -73,7 +73,9 @@ const Root = styled(Box)({ background: '#f5f5f7 !important', }); -const QRCodeStyled = styled(Box)(({ success, loading, buttontheme }) => ({ +const QRCodeStyled = styled(Box, { + shouldForwardProp: (prop) => prop !== 'loading' && prop !== 'success' +})(({ success, loading, buttontheme }) => ({ background: '#fff !important', border: '1px solid #eee !important', borderRadius: '4px !important', @@ -98,7 +100,9 @@ const QRCodeStyled = styled(Box)(({ success, loading, buttontheme }) }, })); -const CopyTextContainer = styled(Box)<{loading: boolean}>(({ loading }) => ({ +const CopyTextContainer = styled(Box, { + shouldForwardProp: (prop) => prop !== 'loading' +})<{loading: boolean}>(({ loading }) => ({ display: loading ? 'none' : 'block', background: '#ffffffcc !important', padding: '0 0.15rem 0.15rem 0 !important', @@ -121,7 +125,7 @@ const Spinner = styled(CircularProgress)<{buttontheme: ButtonTheme}>(({ buttonth color: `${buttontheme.palette.primary} !important`, })); -const Footer = styled('div')({ +const Footer = styled(Typography)({ fontSize: '0.6rem !important', color: '#a8a8a8 !important', fontWeight: 'normal',