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 future flag for no default margin #298

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

Haberkamp
Copy link
Collaborator

@Haberkamp Haberkamp commented Sep 18, 2024

What?

This PR adds a future flag for adding the default margin.

Why?

Components should work in isolation. Adding a default margin to every component breaks that concept. Having a default margin ties the component to a specific context that it should work in. Once the component is used outside of that context you have to work around it. Make modifications to that component i.e. remove the default margin from the component.

That new behavior is how every other component library out there does it. There's no default bottom margin for that component. If you want to add some space between the components you have to do that through the parent component or add a custom class on top of that component to add some spacing.

How?

I've added a new future flag. By default it is disabled. But if you want you can enable it. This will remove the default bottom margin for the components.

Testing?

You can test it yourself by adding a theme provider at the top of the application and setting the removeDefaultMargin to true

Screenshots (optional)

Anything Else?

Right now this only works for the mt-tabs component.

Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
meteor-component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 1:33pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
meteor-admin-sdk-docs ⬜️ Ignored (Inspect) Visit Preview Sep 18, 2024 1:33pm

Copy link

pkg-pr-new bot commented Sep 18, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-icon-kit@298
pnpm add https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-admin-sdk@298
pnpm add https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-tokens@298
pnpm add https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-component-library@298

commit: 519f7cb

@Haberkamp Haberkamp enabled auto-merge (rebase) September 18, 2024 13:34
@Haberkamp Haberkamp merged commit d7d4ce6 into main Sep 18, 2024
8 checks passed
@Haberkamp Haberkamp deleted the add-future-flag-for-no-default-margin branch September 18, 2024 13:35
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.

2 participants