Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/refresh-components/cards/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function Card({

return (
<div className={cn("rounded-16 w-full h-full", classNames[variant])}>
<GeneralLayouts.Section padding={padding} {...props} />
<GeneralLayouts.Section alignItems="start" padding={padding} {...props} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignItems="start" prop is placed before {...props}, which means any alignItems value passed through props will override it. Since CardProps extends GeneralLayouts.SectionProps, users can pass alignItems and it will defeat this fix. Move alignItems="start" after {...props} to ensure it cannot be overridden:

Suggested change
<GeneralLayouts.Section alignItems="start" padding={padding} {...props} />
<GeneralLayouts.Section padding={padding} {...props} alignItems="start" />

</div>
);
}
Loading