fix(ui): move Card bg prop after spread to allow overrides

This commit is contained in:
melvinchia3636
2026-06-02 23:37:41 +08:00
parent 6d49eeba11
commit e8e55d6dc1

View File

@@ -16,16 +16,19 @@ export function Card<T extends React.ElementType = 'div'>({
return (
<Flex
shadow
bg={isInteractive ? surface.defaultInteractive : surface.default}
direction="column"
p="md"
position="relative"
r="lg"
{...(props as FlexProps<T>)}
bg={{
...(isInteractive ? surface.defaultInteractive : surface.default),
...props.bg
}}
style={{
...(isInteractive ? { cursor: 'pointer', transition: 'all 0.2s' } : {}),
...style
}}
{...(props as FlexProps<T>)}
/>
)
}