-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Migrate styles from styled-components
to emotion
#105071
Comments
@smith likely has insight on the current state of |
It looks like there's about a 50/50 split between using the typed If we could get more usage of |
Pinging @elastic/kibana-design (Team:Kibana-Design) |
@elastic/kibana-design I think this issue isn't getting enough attention.
Also:
I'm confused by this. After looking at the FAQ (here), I learned that a module which is tooled to support styled-components can only be converted to use @emotion/css, but the preferred way to tool our components is to use @emotion/react, but that requires a change in the plugin's babel settings. So I don't know what that phrase I quoted is supposed to mean. |
CCing @elastic/eui-team. |
For migrations over timing (e.g. only migrating 1 instance of |
@tsullivan I think we really just need someone to own this effort and commit some time to coordinating it. As you mention, we'll need a clearer call to action that makes the ask more explicit and establishes some expectations. |
Pinging @elastic/appex-sharedux (Team:SharedUX) |
#98157 solves the immediate need of enabling
@emotion/react
in Kibana for the purposes of EUI and (more immediately) Canvas. We will want to convert components currently usingstyled-component
to theemotion
ecosystem, but there is further discussion to be had on the correct approach. For instance, a 1:1 conversion is possible fromstyled-components
to@emotion/styled
; at present this lib is not required for EUI or Canvas but could be added later to support conversions and simplify the babel configuration.EUI intends to use the
css
prop API, not thestyled
API, and the team will have supporting documentation for such when EUI component conversion begin.The list of plugins that currently use
styled-components
is currently maintained here:kibana/packages/kbn-dev-utils/src/babel.ts
Lines 50 to 59 in 447e80e
The text was updated successfully, but these errors were encountered: