New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wildcard: <Card />
migration
#29989
Wildcard: <Card />
migration
#29989
Conversation
{children} | ||
</Component> | ||
) | ||
export const Card = React.forwardRef(({ children, className, as: Component = 'div', ...attributes }, reference) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I have removed the interactive
variant prop.
Reasoning: It seems better to me just to style the card when it is used as a button
element, which is all we would use the interactive prop for, as far as I can tell.
Doing it this way also ensures nobody accidentally styles div
card like it would be interactive
as?: React.ElementType | ||
} | ||
|
||
export const CardFooter = React.forwardRef( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added CardFooter
. We had usage in the application and this wasn't implemented in the original Card
PR
Notifying subscribers in CODENOTIFY files for diff e136905...fa5511e.
|
closes #27681
Description
Automated migration of the
card card-*
styles to the<Card />
WIldcard component. Powered by this codemod: sourcegraph/codemod#73 (This PR is basically super rough as it just required tweaking an existing codemod to migrate. Migration is priority here, will cleanup codemod afterwards)This PR:
card-*
classes to the Wildcard<Card />
componentCardFooter
Wildcard componentNotes
CardBody
andCard
that could be affected and removed some redundant padding styles!