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
The size prop is ignored even when an empty css prop is applied. Is this behavior expected? I wish to have size="l" and css={{textAlign: "center"}} work together.
exportconstDemo=()=>(<EuiFlexGroupdirection="column"alignItems="center"><EuiTitlesize="l"><strong>{"This is a title"}</strong></EuiTitle><EuiTitlesize="l"css={{}}><strong>{"This is a title"}</strong></EuiTitle></EuiFlexGroup>);
The text was updated successfully, but these errors were encountered:
If you're using the css prop in a local React app outside CodeSandbox, you'll need to make sure you have the correct babel setup or JSX pragma for Emotion. Please see https://emotion.sh/docs/css-prop for more information.
cee-chen
added
the
answered
Issues answered by the EUI team - auto-closes open issues in 7 days if no follow-up response
label
Oct 3, 2023
@cee-chen Thanks for help! This was the first time I learned this pragma thing. After adding the /** @jsxImportSource @emotion/react */ pragma, the title works great.
However some other components changed in style, and I need to learn how to adjust further. If you have time, could you suggest some more readings and references on the impact of having/not having the pragma? Thanks!
could you suggest some more readings and references on the impact of having/not having the pragma? Thanks!
Emotion's docs are the canonical source for that kind of information - I find myself going back to them often. For troubleshooting specific issues with your setup, I'd suggest searching through Emotion's GitHub repo (particularly their open/closed issues) - it's likely other devs have run into the same problems as well.
Key information
Usage question
The
size
prop is ignored even when an emptycss
prop is applied. Is this behavior expected? I wish to havesize="l"
andcss={{textAlign: "center"}}
work together.Minimum reproducible sandbox
https://codesandbox.io/s/compassionate-framework-2t8vnn?file=/demo.tsx
The text was updated successfully, but these errors were encountered: