Skip to content
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

Merged
merged 5 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ import {
MouseEventHandler,
SFC,
} from 'react';
import { Interpolation, Theme } from '@emotion/react';

export interface CommonProps {
className?: string;
'aria-label'?: string;
'data-test-subj'?: string;
css?: Interpolation<Theme>;
}

export type NoArgCallback<T> = () => T;
Expand Down
1 change: 1 addition & 0 deletions src/components/overlay_mask/overlay_mask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const EuiOverlayMask: FunctionComponent<EuiOverlayMaskProps> = ({
onClick,
headerZindexLocation = 'above',
maskRef,
css, // TODO: apply custom CSS-in-JS as a className
...rest
}) => {
const overlayMaskNode = useRef<HTMLDivElement>();
Expand Down
2 changes: 2 additions & 0 deletions upcoming_changelogs/6118.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added `css` prop to `CommonProps` interface