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

Update screens types #8042

Merged
merged 1 commit into from Apr 5, 2022
Merged

Update screens types #8042

merged 1 commit into from Apr 5, 2022

Conversation

bradlc
Copy link
Contributor

@bradlc bradlc commented Apr 4, 2022

This PR updates the theme.screens and theme.container.screens types, ensuring that it supports the following formats for individual screens:

string
{ raw: string }
{ min: string }
{ max: string }
{ min: string, max: string }
Array<{raw: string} | { min: string } | { max: string } | { min: string, max: string }>

It also handles an array of strings at the top level, e.g.

module.exports = {
  theme: {
    screens: ['100px', '200px'],
  },
}

Before:

CleanShot 2022-04-04 at 12 49 56@2x

After:

CleanShot 2022-04-04 at 12 50 19@2x

@bradlc bradlc requested a review from RobinMalfait April 4, 2022 13:34
@bradlc bradlc merged commit 6fc8d77 into master Apr 5, 2022
@bradlc bradlc deleted the types-screens branch April 5, 2022 10:46
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.

None yet

2 participants