Skip to content

Commit

Permalink
fix: warning when passing a boolean to border property of a Card (#3275)
Browse files Browse the repository at this point in the history
By default MainCard wrappers like NodeCardWrapper and CardWrapper add a a solid border of 1px, but if the `MainCard.border` prop is used (`false`) the border prop was wrongly set to a boolean instead of string
  • Loading branch information
rhumbertgz authored Sep 27, 2024
1 parent a028460 commit d3c5abf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui/src/ui-component/cards/MainCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ const MainCard = forwardRef(function MainCard(
},
ref
) {
const otherProps = { ...others, border: others.border === false ? undefined : others.border }
return (
<Card
ref={ref}
{...others}
{...otherProps}
sx={{
background: 'transparent',
':hover': {
Expand Down

0 comments on commit d3c5abf

Please sign in to comment.