From 3c46694b21945cde654b39eb9adaa409cab134ec Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 9 Aug 2022 15:21:13 -0500 Subject: [PATCH 1/4] add css to common ts --- src/components/common.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/common.ts b/src/components/common.ts index b93bf58e4e3..8e857e7e4c6 100644 --- a/src/components/common.ts +++ b/src/components/common.ts @@ -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; } export type NoArgCallback = () => T; From d09f5997dc07ca3f2c1e4b78262dcf4d1f3d0c6f Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 9 Aug 2022 15:21:30 -0500 Subject: [PATCH 2/4] extract css from rest --- src/components/overlay_mask/overlay_mask.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/overlay_mask/overlay_mask.tsx b/src/components/overlay_mask/overlay_mask.tsx index dc51bb8c0c9..4c4e90fae95 100644 --- a/src/components/overlay_mask/overlay_mask.tsx +++ b/src/components/overlay_mask/overlay_mask.tsx @@ -58,6 +58,7 @@ export const EuiOverlayMask: FunctionComponent = ({ onClick, headerZindexLocation = 'above', maskRef, + css, ...rest }) => { const overlayMaskNode = useRef(); From bd2093a784ab9b8e7b65b92cf58ab023585302e2 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 11 Aug 2022 09:22:54 -0500 Subject: [PATCH 3/4] CL --- upcoming_changelogs/6118.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 upcoming_changelogs/6118.md diff --git a/upcoming_changelogs/6118.md b/upcoming_changelogs/6118.md new file mode 100644 index 00000000000..b6ef9861cea --- /dev/null +++ b/upcoming_changelogs/6118.md @@ -0,0 +1,2 @@ +- Added `css` prop to `CommonProps` interface + From 9989ea2e8aae0cf733b3bee28c25dd2253caa244 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 11 Aug 2022 13:42:44 -0500 Subject: [PATCH 4/4] comment --- src/components/overlay_mask/overlay_mask.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/overlay_mask/overlay_mask.tsx b/src/components/overlay_mask/overlay_mask.tsx index 4c4e90fae95..282b69b10f0 100644 --- a/src/components/overlay_mask/overlay_mask.tsx +++ b/src/components/overlay_mask/overlay_mask.tsx @@ -58,7 +58,7 @@ export const EuiOverlayMask: FunctionComponent = ({ onClick, headerZindexLocation = 'above', maskRef, - css, + css, // TODO: apply custom CSS-in-JS as a className ...rest }) => { const overlayMaskNode = useRef();