Skip to content

Feat: responsive styles #1737

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

Merged
merged 23 commits into from
Jul 2, 2024
Merged

Feat: responsive styles #1737

merged 23 commits into from
Jul 2, 2024

Conversation

madhurisandbhor
Copy link
Contributor

@madhurisandbhor madhurisandbhor commented Jun 10, 2024

What does it do?

This PR introduces responsive props to components like Box, Flex to start with. To pass responsive props on components, user has to use object notation as below,

<Component padding={{initial: 2, small: 4, medium: 6, large: 8}} />

User can also pass arrays to shorthand properties like padding/margin.

<Component padding={{initial: [2, 4], small: 4, medium: [2, 4, 4], large: "24px" }} />

Why is it needed?

To ensure design system is responsive, read more.

@madhurisandbhor madhurisandbhor self-assigned this Jun 10, 2024
Copy link

vercel bot commented Jun 10, 2024

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

Name Status Preview Comments Updated (UTC)
design_system_v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2024 0:42am
design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2024 0:42am
design-system-website 🛑 Canceled (Inspect) Jul 2, 2024 0:42am

Copy link

changeset-bot bot commented Jun 10, 2024

🦋 Changeset detected

Latest commit: 7982153

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@strapi/design-system Major
@strapi/icons Major
@strapi/ui-primitives Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 10, 2024

Size Change: +736 B (+0.25%)

Total Size: 290 kB

Filename Size Change
packages/design-system/dist/index.js 95.4 kB +337 B (+0.35%)
packages/design-system/dist/index.mjs 94.3 kB +399 B (+0.43%)
ℹ️ View Unchanged
Filename Size
packages/icons/dist/index.js 21.9 kB
packages/icons/dist/index.mjs 21.6 kB
packages/icons/dist/symbols-index.js 11.8 kB
packages/icons/dist/symbols-index.mjs 11.6 kB
packages/primitives/dist/index.js 16.8 kB
packages/primitives/dist/index.mjs 16.3 kB

compressed-size-action

Copy link
Contributor

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far. This only works with spaces, how do you plan to extend it to work with other props?

@madhurisandbhor madhurisandbhor force-pushed the feat/responsive-box-component branch from 52cebbc to 519a0d7 Compare June 11, 2024 15:53
Base automatically changed from releases/2.0.0 to main June 14, 2024 12:11
@jhoward1994
Copy link
Contributor

Should we remove this?

A Flex Flex

@madhurisandbhor madhurisandbhor dismissed joshuaellis’s stale review July 2, 2024 14:58

changes are updated

@madhurisandbhor madhurisandbhor merged commit daae1f0 into main Jul 2, 2024
10 of 11 checks passed
@madhurisandbhor madhurisandbhor deleted the feat/responsive-box-component branch July 2, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: 💥 Breaking change This PR contains breaking changes and should not be merged pr: feature This PR adds a new feature source: design-system relates to design-system package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants