Skip to content

Commit

Permalink
Added EuiOverlayMask directly to EuiModal (#4480)
Browse files Browse the repository at this point in the history
* added EuiOverlayMask directly

* removed EuiOverlayMask

* Fixing EuiMarkdownEditor usage

* Cleaning up the docs and fixing mobile widths

Co-authored-by: cchaos <[email protected]>
  • Loading branch information
akashgp09 and cchaos authored Feb 5, 2021
1 parent 9bcf6b4 commit 5e75993
Show file tree
Hide file tree
Showing 16 changed files with 480 additions and 439 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Added `EuiOverlayMask` directly to `EuiModal` ([#4480](https://github.com/elastic/eui/pull/4480))

**Bug fixes**

- Fixed invalid color entry passed to `EuiBadge` color prop ([#4481](https://github.com/elastic/eui/pull/4481))
Expand Down
25 changes: 11 additions & 14 deletions src-docs/src/views/color_picker/containers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
EuiModalBody,
EuiModalHeader,
EuiModalHeaderTitle,
EuiOverlayMask,
EuiSpacer,
} from '../../../../src/components';

Expand Down Expand Up @@ -63,19 +62,17 @@ export default () => {

if (isModalVisible) {
modal = (
<EuiOverlayMask>
<EuiModal onClose={closeModal} style={{ width: '800px' }}>
<EuiModalHeader>
<EuiModalHeaderTitle>Color picker in a modal</EuiModalHeaderTitle>
</EuiModalHeader>

<EuiModalBody>
<EuiFormRow label="Color picker">{colorPicker}</EuiFormRow>
<EuiSpacer />
<EuiFormRow label="Color stops">{stops}</EuiFormRow>
</EuiModalBody>
</EuiModal>
</EuiOverlayMask>
<EuiModal onClose={closeModal} style={{ width: '800px' }}>
<EuiModalHeader>
<EuiModalHeaderTitle>Color picker in a modal</EuiModalHeaderTitle>
</EuiModalHeader>

<EuiModalBody>
<EuiFormRow label="Color picker">{colorPicker}</EuiFormRow>
<EuiSpacer />
<EuiFormRow label="Color stops">{stops}</EuiFormRow>
</EuiModalBody>
</EuiModal>
);
}

Expand Down
17 changes: 7 additions & 10 deletions src-docs/src/views/combo_box/containers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
EuiModalBody,
EuiModalHeader,
EuiModalHeaderTitle,
EuiOverlayMask,
EuiSpacer,
} from '../../../../src/components';

Expand Down Expand Up @@ -122,15 +121,13 @@ export default () => {

if (isModalVisible) {
modal = (
<EuiOverlayMask>
<EuiModal onClose={closeModal} style={{ width: '800px' }}>
<EuiModalHeader>
<EuiModalHeaderTitle>Combo box in a modal</EuiModalHeaderTitle>
</EuiModalHeader>

<EuiModalBody>{comboBox}</EuiModalBody>
</EuiModal>
</EuiOverlayMask>
<EuiModal onClose={closeModal} style={{ width: '800px' }}>
<EuiModalHeader>
<EuiModalHeaderTitle>Combo box in a modal</EuiModalHeaderTitle>
</EuiModalHeader>

<EuiModalBody>{comboBox}</EuiModalBody>
</EuiModal>
);
}

Expand Down
Loading

0 comments on commit 5e75993

Please sign in to comment.