-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to change DialogModal background color (#767)
* Add ability to change DialogModal background color * Address PR feedback * Implement and use `withPortalContainer` helper * Set close icon background color dynamically; update stories
- Loading branch information
1 parent
fa54089
commit 3380390
Showing
7 changed files
with
271 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
121 changes: 121 additions & 0 deletions
121
src/shared-components/dialogModal/__snapshots__/test.tsx.snap
This file contains 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,121 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<DialogModal /> renders dialog modal with custom color 1`] = ` | ||
.emotion-2 { | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
z-index: 999999; | ||
background-color: rgba(58,55,75,0.7); | ||
-webkit-transition: opacity 250ms cubic-bezier(0.075,0.82,0.165,1); | ||
transition: opacity 250ms cubic-bezier(0.075,0.82,0.165,1); | ||
} | ||
.emotion-2.entering, | ||
.emotion-2.exiting, | ||
.emotion-2.exited { | ||
opacity: 0; | ||
} | ||
.emotion-2.entered { | ||
opacity: 1; | ||
} | ||
@media (min-width:768px) { | ||
.emotion-2 { | ||
display: -webkit-box; | ||
display: -webkit-flex; | ||
display: -ms-flexbox; | ||
display: flex; | ||
-webkit-flex-flow: row nowrap; | ||
-ms-flex-flow: row nowrap; | ||
flex-flow: row nowrap; | ||
-webkit-box-pack: center; | ||
-webkit-justify-content: center; | ||
-ms-flex-pack: center; | ||
justify-content: center; | ||
-webkit-align-items: center; | ||
-webkit-box-align: center; | ||
-ms-flex-align: center; | ||
align-items: center; | ||
} | ||
} | ||
.emotion-0 { | ||
width: 100%; | ||
margin: 0 auto; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
border-top-left-radius: 32px; | ||
border-top-right-radius: 32px; | ||
box-shadow: 0px -8px 24px rgba(52,51,82,0.05); | ||
background: #F8F8FA; | ||
padding: 3.5rem 1.5rem 2rem; | ||
overflow-y: auto; | ||
max-height: 700px; | ||
-webkit-transition: -webkit-transform 250ms cubic-bezier(0.075,0.82,0.165,1); | ||
-webkit-transition: transform 250ms cubic-bezier(0.075,0.82,0.165,1); | ||
transition: transform 250ms cubic-bezier(0.075,0.82,0.165,1); | ||
} | ||
.emotion-0.entered { | ||
-webkit-transform: translateY(0%); | ||
-ms-transform: translateY(0%); | ||
transform: translateY(0%); | ||
} | ||
.emotion-0.entering, | ||
.emotion-0.exiting, | ||
.emotion-0.exited { | ||
-webkit-transform: translateY(100%); | ||
-ms-transform: translateY(100%); | ||
transform: translateY(100%); | ||
} | ||
.emotion-0 p { | ||
margin-bottom: 1.5rem; | ||
} | ||
.emotion-0 p:last-of-type { | ||
margin-bottom: 2rem; | ||
} | ||
@media (min-width:768px) { | ||
.emotion-0 { | ||
position: relative; | ||
width: 456px; | ||
border-radius: 8px; | ||
padding: 3.5rem; | ||
} | ||
.emotion-0.entering, | ||
.emotion-0.exiting, | ||
.emotion-0.exited { | ||
-webkit-transform: translateY(40%); | ||
-ms-transform: translateY(40%); | ||
transform: translateY(40%); | ||
} | ||
} | ||
<div | ||
class="entering emotion-2 emotion-3" | ||
> | ||
<span | ||
hidden="" | ||
/> | ||
<div | ||
class="entering emotion-0 emotion-1" | ||
> | ||
<div> | ||
Dialog Modal Children Content | ||
</div> | ||
</div> | ||
<span | ||
hidden="" | ||
/> | ||
</div> | ||
`; |
This file contains 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 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 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 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
Oops, something went wrong.