-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate DialogV1 to css modules (#5246)
* migrate DialogV1 to css modules * changeset * fix stylelints * remove type test * use data attributes --------- Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>
- Loading branch information
1 parent
d6ea909
commit c4ecb73
Showing
5 changed files
with
186 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": minor | ||
--- | ||
|
||
Migrate DialogV1 to CSS Modules |
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,67 @@ | ||
.Overlay { | ||
&::before { | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
z-index: 99; | ||
display: block; | ||
cursor: default; | ||
content: ' '; | ||
background: var(--overlay-backdrop-bgColor); | ||
} | ||
} | ||
|
||
.CloseIcon { | ||
position: absolute; | ||
top: var(--base-size-8); | ||
right: var(--base-size-16); | ||
} | ||
|
||
.Dialog { | ||
position: fixed; | ||
top: 0; | ||
left: 50%; | ||
z-index: 999; | ||
max-height: 80vh; | ||
margin: 10vh auto; | ||
background-color: var(--bgColor-default); | ||
border-radius: var(--borderRadius-medium); | ||
outline: none; | ||
box-shadow: var(--shadow-floating-large); | ||
transform: translateX(-50%); | ||
|
||
&:where([data-width='default']) { | ||
/* stylelint-disable-next-line primer/responsive-widths */ | ||
width: 440px; | ||
} | ||
|
||
&:where([data-width='narrow']) { | ||
width: 320px; | ||
} | ||
|
||
&:where([data-width='wide']) { | ||
/* stylelint-disable-next-line primer/responsive-widths */ | ||
width: 640px; | ||
} | ||
|
||
@media screen and (max-width: 750px) { | ||
width: 100dvw; | ||
height: 100dvh; | ||
margin: 0; | ||
border-radius: 0; | ||
} | ||
} | ||
|
||
.Header { | ||
display: flex; | ||
padding: var(--base-size-16); | ||
background: var(--bgColor-muted); | ||
border-bottom: var(--borderWidth-thin) solid var(--borderColor-default); | ||
border-radius: var(--borderRadius-medium) var(--borderRadius-medium) 0 0; | ||
|
||
@media screen and (max-width: 750px) { | ||
border-radius: 0; | ||
} | ||
} |
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