-
Notifications
You must be signed in to change notification settings - Fork 844
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
[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/ |
@@ -58,6 +58,7 @@ export const EuiOverlayMask: FunctionComponent<EuiOverlayMaskProps> = ({ | |||
onClick, | |||
headerZindexLocation = 'above', | |||
maskRef, | |||
css, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Preview documentation changes for this PR: https://eui.elastic.co/pr_6118/ |
Summary
Added
css
prop toCommonProps
interface. All components using theCommonProps
interface can be styled with Emotion, but the babel plugin does not sufficiently cover cases likecomponentProps
props that are not created with JSX. ExtendingCommonProps
allows for broader support.Checklist