Skip to content

Add theme.global.radius and theme.global.breakpoint[size].radius #7499

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 3 commits into from
Jan 31, 2025

Conversation

taysea
Copy link
Collaborator

@taysea taysea commented Jan 31, 2025

What does this PR do?

Adds theme.global.radius and theme.global.breakpoint[size].radius to allow for radius values to be styled independently from "edgeSize" (which controls gap, margin, pad).

Adjusts logic to fallback to "edgeSize" if theme.global.radius is not provided.

Where should the reviewer start?

Add theme.global.radius and theme.global.breakpoint[size].radius

What testing has been done on this PR?

Locally by modifying base theme.

How should this be manually tested?

theme: {
   global: {
      breakpoint: {
        small: {
            radius: {
              small: '2px',
            },
         },
      },
     radius: {
         small: '38px',
     },
}

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?

Screenshots (if appropriate)

Do the grommet docs need to be updated?

Yes.

Should this PR be mentioned in the release notes?

Yes.

Is this change backwards compatible or is it a breaking change?

Backwards compatible.

Co-authored-by: Brittany <42451602+britt6612@users.noreply.github.com>
Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

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

Looks good!

@jcfilben jcfilben merged commit 77857b7 into master Jan 31, 2025
15 of 16 checks passed
@jcfilben jcfilben deleted the theme-radius branch January 31, 2025 21:37
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.

4 participants