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

@theme-ui/match-media : TypeScript conversion #696

Merged
merged 4 commits into from
Feb 20, 2020
Merged

@theme-ui/match-media : TypeScript conversion #696

merged 4 commits into from
Feb 20, 2020

Conversation

LekoArts
Copy link
Collaborator

Changing match-media package to TS. Didn't touch the tests yet.

Part of #668

@LekoArts LekoArts mentioned this pull request Feb 20, 2020
32 tasks
@@ -511,7 +511,7 @@ export type ColorMode = {
}

export interface Theme {
breakpoints?: ObjectOrArray<number | string | symbol>
breakpoints?: Array<string>
Copy link
Collaborator Author

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

Copy link
Member

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",
Copy link
Collaborator Author

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)

Copy link
Member

@mxstbr mxstbr left a 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!

@mxstbr mxstbr merged commit cf5b00a into system-ui:master Feb 20, 2020
@LekoArts LekoArts deleted the ts-match-media branch February 20, 2020 16:43
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

3 participants