-
Notifications
You must be signed in to change notification settings - Fork 895
feat: Add a new boolean hasChildBackground prop to the Flyout to use for child flyouts only
#9056
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
Changes from 14 commits
12d31c8
8748ea9
a974094
e1f1014
1f764c3
bd3abec
f380e55
1e6e55b
aaee46e
dd21ae3
3e78537
b75aee2
f5ae409
6e1ea99
8a2c247
b8900dc
0cfb396
8a1b42c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added a new `childBackgroundShaded` boolean prop (defaults to false) to `EuiFlyout` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -176,6 +176,11 @@ interface _EuiFlyoutComponentProps { | |
| */ | ||
| pushAnimation?: boolean; | ||
| style?: CSSProperties; | ||
| /** | ||
| * When the flyout is used as a child in a managed flyout session, setting `true` gives the shaded background style. | ||
| * @default false | ||
| */ | ||
| childBackgroundShaded?: boolean; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @paulinashakirova we'll also need to update all the places that used the old
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To align more with existing naming conventions for booleans, this should rather be something like:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for your suggestion!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@paulinashakirova Sorry, I don't quite understand - What do you mean exactly?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gotcha! |
||
| /** | ||
| * Object of props passed to EuiFocusTrap. | ||
| * `shards` specifies an array of elements that will be considered part of the flyout, preventing the flyout from being closed when clicked. | ||
|
|
@@ -262,6 +267,7 @@ export const EuiFlyoutComponent = forwardRef( | |
| paddingSize = DEFAULT_PADDING_SIZE, | ||
| maxWidth = false, | ||
| style, | ||
| childBackgroundShaded = false, | ||
| maskProps, | ||
| type = DEFAULT_TYPE, | ||
| outsideClickCloses, | ||
|
|
@@ -478,6 +484,7 @@ export const EuiFlyoutComponent = forwardRef( | |
| const classes = classnames( | ||
| 'euiFlyout', | ||
| openStateToClassNameMap[openState], | ||
| isChildFlyout && childBackgroundShaded && 'euiFlyout--childShaded', | ||
| className | ||
| ); | ||
|
|
||
|
|
||
This file was deleted.
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.
In this file, let's change line 97-98 to:
97 is ok, 98 should have the mention background styles removed