-
Notifications
You must be signed in to change notification settings - Fork 862
[EuiOverlayMask] Convert to Emotion; remove onClick prop
#6090
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
Merged
thompsongl
merged 15 commits into
elastic:main
from
thompsongl:css-in-js/euioverlaymask
Aug 31, 2022
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
52d6648
add fade in animation
thompsongl acc2e7a
emotion styles; remove onClick handler; useEuiPortal
thompsongl 1030abc
remove unused sass
thompsongl bc7488e
update imagewrapper click to close
thompsongl 7178a42
docs
thompsongl 7faf2f6
CL
thompsongl 7b38b12
Merge branch 'main' into css-in-js/euioverlaymask
thompsongl 41ba2ba
fix props table
thompsongl c5b656f
Merge branch 'main' into css-in-js/euioverlaymask
thompsongl 95845ce
fix docs example
thompsongl 6185dbe
Merge branch 'main' into css-in-js/euioverlaymask
thompsongl d6645be
fix zIndex
thompsongl 287c640
account for header
thompsongl 05f782c
Merge branch 'main' into css-in-js/euioverlaymask
thompsongl 2bd9c81
Merge branch 'main' into css-in-js/euioverlaymask
thompsongl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,7 @@ | ||
| import React, { FunctionComponent, ReactNode } from 'react'; | ||
| import React, { FunctionComponent } from 'react'; | ||
| import { CommonProps } from '../../../../src/components/common'; | ||
| import { EuiOverlayMaskInterface } from '../../../../src/components/overlay_mask/overlay_mask'; | ||
|
|
||
| interface EuiOverlayMaskInterface extends CommonProps { | ||
| /** | ||
| * Function that applies to clicking the mask itself and not the children | ||
| */ | ||
| onClick?: () => void; | ||
| /** | ||
| * ReactNode to render as this component's children | ||
| */ | ||
| children?: ReactNode; | ||
| /** | ||
| * Should the mask visually sit above or below the EuiHeader (controlled by z-index) | ||
| */ | ||
| headerZindexLocation?: 'above' | 'below'; | ||
| } | ||
|
|
||
| export const EuiOverlayMaskProps: FunctionComponent<EuiOverlayMaskInterface> = () => ( | ||
| <div /> | ||
| ); | ||
| export const EuiOverlayMaskProps: FunctionComponent< | ||
| EuiOverlayMaskInterface & CommonProps | ||
| > = () => <div />; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import { css } from '@emotion/react'; | ||
| import { logicalCSS, euiAnimFadeIn } from '../../global_styling'; | ||
| import { transparentize, UseEuiTheme } from '../../services'; | ||
|
|
||
| export const euiOverlayMaskStyles = ({ euiTheme }: UseEuiTheme) => ({ | ||
| euiOverlayMask: css` | ||
| .euiOverlayMask { | ||
| position: fixed; | ||
| ${logicalCSS('top', 0)} | ||
| ${logicalCSS('left', 0)} | ||
| ${logicalCSS('right', 0)} | ||
| ${logicalCSS('bottom', 0)} | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| ${logicalCSS('padding-bottom', '10vh')}; | ||
| animation: ${euiAnimFadeIn} ${euiTheme.animation.fast} ease-in; | ||
| background: ${transparentize(euiTheme.colors.ink, 0.5)}; | ||
| } | ||
| `, | ||
| aboveHeader: css` | ||
| .euiOverlayMask { | ||
| z-index: ${euiTheme.levels.mask}; | ||
| } | ||
| `, | ||
| belowHeader: css` | ||
| .euiOverlayMask { | ||
| z-index: ${euiTheme.levels.maskBelowHeader}; | ||
| // TODO: use size variable when EuiHeader is converted | ||
| ${logicalCSS('top', `${euiTheme.base * 3}px`)}; | ||
| } | ||
| `, | ||
| }); | ||
|
|
||
| export const euiOverlayMaskBodyStyles = css` | ||
| body { | ||
| overflow: hidden; | ||
| } | ||
| `; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.