Skip to content

Commit a904ba6

Browse files
authored
Merge pull request #18 from labcodes/dialog-message-justify
Justify dialog's close button
2 parents b763a46 + b62f060 commit a904ba6

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

.babelrc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"presets": [
3-
["@babel/env", {
4-
"targets": {
5-
"browsers": "last 3 versions"
3+
[
4+
"@babel/env",
5+
{
6+
"targets": {
7+
"browsers": "last 3 versions"
8+
}
69
}
7-
}],
10+
],
811
"@babel/react"
912
],
1013
"plugins": [
@@ -14,6 +17,8 @@
1417
{
1518
"loose": true
1619
}
17-
]
20+
],
21+
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
22+
["@babel/plugin-proposal-private-methods", { "loose": true }]
1823
]
1924
}

scss/components/_lab-dialog.scss

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,18 +197,14 @@
197197

198198
// Global elements
199199
.lab-dialog__close-button {
200-
display: none;
200+
display: flex;
201201
cursor: pointer;
202202
width: 40px;
203203
height: 40px;
204204
background-color: unset;
205205
border: none;
206-
207-
&.lab-dialog__close-button--message {
208-
display: flex;
209-
align-items: center;
210-
justify-content: center;
211-
}
206+
align-items: center;
207+
justify-content: center;
212208

213209
&:focus {
214210
border-radius: $radius-1;
@@ -371,10 +367,6 @@
371367
background-color: $mineral-70;
372368
}
373369

374-
.lab-dialog__close-button--message {
375-
display: block;
376-
}
377-
378370
.lab-dialog__header--message {
379371
justify-content: flex-end;
380372
}

src/Dialog/MessageDialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default class MessageDialog extends React.Component {
109109
</button>
110110
<div className="lab-dialog__header lab-dialog__header--message">
111111
<button
112-
className="lab-dialog__close-button lab-dialog__close-button--message"
112+
className="lab-dialog__close-button"
113113
type="button"
114114
{...(isModal ? { tabIndex: "2" } : undefined)}
115115
onClick={handleClose}

0 commit comments

Comments
 (0)