Skip to content
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

Add the StackMainContent component #2754

Open
wants to merge 1 commit into
base: grid-and-form-layout-examples
Choose a base branch
from

Conversation

jamesricky
Copy link
Contributor

Description

This version of MainContent only adds content spacing and height when it's the last visible StackSwitch.

Using StackMainContent instead of MainContent prevents unintended or duplicate spacings in cases where multiple MainContent components are used inside nested StackSwitch components.

Example of handmade "Add Product Variant" form in demo

In this case, the form, using MainContent for content spacing (inside a StackSwitch and StackPage) is nested inside Tabs which are also wrapped with MainContent for spacing around the Tabs.

Before After
Add Variant Form Previously Add Variant Form Now

Changeset

  • I have verified if my change requires a changeset

Related tasks and documents

https://vivid-planet.atlassian.net/browse/COM-1245

Open TODOs/questions

This version of `MainContent` only adds content spacing and height
when it's the last visible `StackSwitch`.

Using `StackMainContent` instead of `MainContent` prevents unintended
or duplicate spacings in cases where multiple `MainContent` components
are used inside nested `StackSwitch` components.
@jamesricky jamesricky force-pushed the add-stack-main-content-component branch from d4e89ae to eadd5f0 Compare November 15, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant