Repository navigation
Card: update to g2 implementation - #32566
Conversation
|
Size Change: +252 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
dc6ad74 to
6bce1b3
Compare
99bfd97 to
39d742c
Compare
There was a problem hiding this comment.
This is not necessary anymore since the CardHeader and CardFooter components are using PolymorphicComponentProps
39d742c to
43f4c68
Compare
43f4c68 to
76e24af
Compare
There was a problem hiding this comment.
Compared to the g2's "original" implementation, I changed the default value of the elevation prop to 0. This is to match the default value of false that the isElevated prop has in the old (production) card implementation
|
This is looking great so far! I'm glad you decided to split this PR into multiple phases, it makes it much easier to review. |
5312d7e to
4fe415f
Compare
|
Am I correct in my quick search that there are no usages of the Is the only way to test this component through the storybook for now? I seriously cannot find any usages in Gutenberg. |
Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
…ues for the `size` prop
…mputing deprecatedProps
6c2cbd9 to
5bd2875
Compare
|
Did one last rebase to include #32745, which fixes the context bugs mentioned above. I'll do some final manual checking, wait for tests to pass and merge |
|
Why was Can we either switch back to |
Hey @TimothyBJacobs , thank you for reporting this. I've opened #37097 to re-introduce support for the |
Description
This is part of a series of PRs with the final goal of achieving the same result as #32243 in smaller (and easier to review) steps.
Requires #32557 and #32561 to be merged first.
<Card />set of components with the new g2 implementation (found inpackages/components/src/ui/card, which is based on a new context system and Emotion'scssfunction for the styles.isElevatedprop on the<Card />component is being soft-deprecated in favour of a newelevationprop (which enables fine-grain control on the card's elevation)<CardMedia />component didn't originally have a g2 implementation and was created directly in this PR (pretty much a 1:1 with the current version)<CardDivider />component didn't originally have a g2 implementation and was created directly in this PR. Although its APIs are the same as the old version, internally it now extends the<Divider />componentpaddingassociated with thesizeproperty has been tweaked to match the same spacing as in the old version of the componentsTesting instructions
CardStorybookCardStorybook:npm run storybook:devhttp://localhost:50240/?path=/story/components-card--defaultComponents / Card / Media - Horizontally Aligned<Card />in the repo keep working as beforeScreenshots
Types of changes
New feature
Checklist:
*.native.jsfiles for terms that need renaming or removal).