[CSS-in-JS] Add css to common props#6118
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6118/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6118/ |
| onClick, | ||
| headerZindexLocation = 'above', | ||
| maskRef, | ||
| css, |
There was a problem hiding this comment.
I'm a little confused about this change - shouldn't we accept custom css on the overlay mask?
edit: if this change is just to pass type issues and we're planning on addressing this in the EuiOverlayMask Emotion conversion, no worries, but we should definitely add a // TODO: apply custom CSS-in-JS as a className comment of some kind to this line to ensure css doesn't just get stripped
There was a problem hiding this comment.
Yeah I'm working on styling ideas in #6090, and any method that would allow for Emotion styling will come from there. I'll add a comment, because the css prop on EuiOverlayMask wouldn't have any effect currently anyway.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6118/ |
Summary
Added
cssprop toCommonPropsinterface. All components using theCommonPropsinterface can be styled with Emotion, but the babel plugin does not sufficiently cover cases likecomponentPropsprops that are not created with JSX. ExtendingCommonPropsallows for broader support.Checklist