Component System: Add Surface Component#28596
Merged
Conversation
32 tasks
|
Size Change: 0 B Total Size: 1.38 MB ℹ️ View Unchanged
|
Contributor
sarayourfriend
left a comment
There was a problem hiding this comment.
Same deal as Elevation here. LGTM, just wish we had more specific tests and we also need to add it to the tsconfig.json in packages/components.
added 11 commits
February 10, 2021 11:14
sarayourfriend
approved these changes
Feb 16, 2021
Author
|
Almost there :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update adds a new Surface component for the new Component System.
This is a brand new layout primitive component.
@wordpress/componentspreviously didn't have aSurfacecomponent, so we didn't need to "adapt" it.This component renders basic UI backgrounds using the "surface" values from the new Style System.
All the components from the new Component System have dark mode built it.
Surface's dark mode is the most obvious as you can see the element change from light to dark when flipped.
This is made clearer when using the new
<Text />component within<Surface />.Surface is effectively used in everything that has a standard UI background. Cards, Menus, Modals, Toolbars, Sidebars, etc...
How has this been tested?
Tested locally in Storybook and in Jest.
Checklist: