Skip to content

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.

3 participants