-
Notifications
You must be signed in to change notification settings - Fork 672
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
@theme-ui/match-media : TypeScript conversion #696
Conversation
@@ -511,7 +511,7 @@ export type ColorMode = { | |||
} | |||
|
|||
export interface Theme { | |||
breakpoints?: ObjectOrArray<number | string | symbol> | |||
breakpoints?: Array<string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the documentation this is only ever a string[]
. Also was necessary to fix type issues in match-media
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd guess the types for this might have originated in older versions of Styled System FWIW -- might be some other holdovers from that theme interface to keep an eye out for
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"devDependencies": { | ||
"react": "^16.9.0", | ||
"theme-ui": "^0.3.1" | ||
"@theme-ui/core": "^0.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch out theme-ui
for /core
(to access Theme
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks perfect! 🔥 Thank you!
Changing
match-media
package to TS. Didn't touch the tests yet.Part of #668