Skip to content

Commit

Permalink
fix: don't forward boolean props
Browse files Browse the repository at this point in the history
  • Loading branch information
chedieck committed May 22, 2024
1 parent ed8534b commit ce4edb9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions react/lib/components/Widget/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ const Root = styled(Box)({
background: '#f5f5f7 !important',
});

const QRCodeStyled = styled(Box)<StyleProps>(({ success, loading, buttontheme }) => ({
const QRCodeStyled = styled(Box, {
shouldForwardProp: (prop) => prop !== 'loading' && prop !== 'success'
})<StyleProps>(({ success, loading, buttontheme }) => ({
background: '#fff !important',
border: '1px solid #eee !important',
borderRadius: '4px !important',
Expand All @@ -98,7 +100,9 @@ const QRCodeStyled = styled(Box)<StyleProps>(({ 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',
Expand All @@ -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',
Expand Down

0 comments on commit ce4edb9

Please sign in to comment.