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
When I use rtlPlugin from stylis-plugin-rtl, I get type error: Type '(element: Element, index: number, children: (string | Element)[], callback: Middleware) => string | void' is not assignable to type 'StylisPlugin'.
just edit return type on stylisRTLPlugin function in ~/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts like below:
declare function stylisRTLPlugin(element: MiddlewareParams[0], index: MiddlewareParams[1], children: MiddlewareParams[2], callback: MiddlewareParams[3]): string | undefined;
Current Behavior 😯
When I use
rtlPlugin
fromstylis-plugin-rtl
, I get type error:Type '(element: Element, index: number, children: (string | Element)[], callback: Middleware) => string | void' is not assignable to type 'StylisPlugin'.
Expected Behavior 🤔
Not having this type (TypeScript) error.
To Reproduce 🕹
Live Example (codesandbox/eager-tereshkova-lx74s)
Context 🔦
I'm trying to use rtlPlugin in order to display mui components in rtl direction.
Environment information 🌎
Simple React/Next.js. Also check Live Example above for more detailed.
react
version: 17.0.2stylis
version: 4.0.10stylis-plugin-rtl
version: 2.1.0@emotion/react
version: 11.4.1@emotion/styled
version: 11.3.0I have previously posted this issue at material-ui, but they reported that the bug is either within
@emotion/cache
orstylis-plugin-rtl
(comment).Also there's an exact issue opened at emotion-js/emotion in case the bug is there.
The text was updated successfully, but these errors were encountered: