-
Notifications
You must be signed in to change notification settings - Fork 21
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
refactor(react-ui-kit): Emotion v11 migration #3349
Conversation
import {COLOR} from '../Identity/colors'; | ||
import {filterProps} from '../util'; | ||
|
||
// Apply custom theme to Emotion so TypeScript can pick it up in the css prop | ||
declare module '@emotion/react' { |
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.
Theme needs to be augmented in order to have correct typing for the css prop theme parameter.
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.
@@ -36,6 +36,9 @@ module.exports = { | |||
resolve: { | |||
alias: { | |||
'@wireapp/react-ui-kit': path.resolve(__dirname, 'src'), | |||
// Needed until libs have support for emotion v11 | |||
// https://github.com/infinum/emotion-normalize/pull/12 | |||
'@emotion/core': '@emotion/react', |
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.
We need to redirect calls from @emotion/core
to @emotion/react
until emotion-normalize
supports it.
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.
Superseeded by #4254 |
Emotion provides a good amount of compatibility from v10 to v11 but there are some areas that need to be migrated.
https://emotion.sh/docs/emotion-11
The main change from our perspective is the renaming of the
@emotion/core
package to@emotion/react
.