You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to enable that feature I had to add @emotion/babel-plugin as a dev dependency and inside the babel plugin list in vite.config.ts. While that made component selectors work, the type definitions provided in the vite+emotion example still flagged the [Child]:{...} selector as invalid. You can see the behavior in this CS. Can this be corrected by expanding the types in twin.d.ts, similar to the suggestion in ben-rogerson/twin.macro#116?
One other notable aspect of such an addition -- the component selector can be arbitrarily deep inside the selector tree, e.g. {'&:hover': { [Child]: { color: 'green' }}}.
The text was updated successfully, but these errors were encountered:
The existing demo of twin.macro + vite + emotion does not appear to allow component selectors using object syntax, e.g. as in the following snippet:
In order to enable that feature I had to add
@emotion/babel-plugin
as a dev dependency and inside the babel plugin list invite.config.ts
. While that made component selectors work, the type definitions provided in the vite+emotion example still flagged the[Child]:{...}
selector as invalid. You can see the behavior in this CS. Can this be corrected by expanding the types intwin.d.ts
, similar to the suggestion in ben-rogerson/twin.macro#116?One other notable aspect of such an addition -- the component selector can be arbitrarily deep inside the selector tree, e.g.
{'&:hover': { [Child]: { color: 'green' }}}
.The text was updated successfully, but these errors were encountered: