feat: add page layout, header, panel #56
Merged
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.
But basically, adds a couple of layout components to help users have a consistent experience through the apps. I still wanted to keep it very flexible, so the structure is the following:
I noticed the layout for the app was the same as the Modal, so this structure also allows us to reuse the Panel and Header components for the Modal.
You can also center the panel with
centered: true
. What is really nice is if you have one element, it will center it. But if you have two, it will keep the header at the top, but center the second one. I think this makes for a very nice experience.I know it's like... 3 layers of nested components, but I do prefer the way we can compose a layout with all of them, and it still allows people to inject their own layout, but still reuse the panels.