File tree Expand file tree Collapse file tree 4 files changed +45
-39
lines changed Expand file tree Collapse file tree 4 files changed +45
-39
lines changed Original file line number Diff line number Diff line change
1
+ $buffer: 0.5em;
2
+ $space: 0.25em;
3
+
4
+ .container {
5
+ position : absolute;
6
+ z-index : 10 ;
7
+ right : $buffer;
8
+ botto m: $buffer;
9
+ left: $buffer;
10
+ max- width: 50em ;
11
+ border : 2px solid # 428bca ;
12
+ margin-right : auto;
13
+ margin-left : auto;
14
+ background : white;
15
+ }
16
+
17
+ .notification {
18
+ display : flex;
19
+ }
20
+
21
+ .notificationContent {
22
+ padding : $space 0 $space $space;
23
+ }
24
+
25
+ .close {
26
+ composes : -buttonReset from './shared.module.css' ;
27
+ padding : $space;
28
+ background: # e1e1db ;
29
+ cursor : pointer;
30
+ }
Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ import { Close } from './Icon';
7
7
import * as actions from './actions' ;
8
8
import * as selectors from './selectors' ;
9
9
10
+ import styles from './Notifications.module.css' ;
11
+
10
12
const SURVEY_URL = 'https://blog.rust-lang.org/2020/09/10/survey-launch.html' ;
11
13
12
14
const Notifications : React . SFC = ( ) => {
13
15
return (
14
16
< Portal >
15
- < div className = "notifications" >
17
+ < div className = { styles . container } >
16
18
< Rust2020SurveyNotification />
17
19
</ div >
18
20
</ Portal >
@@ -40,9 +42,9 @@ interface NotificationProps {
40
42
}
41
43
42
44
const Notification : React . SFC < NotificationProps > = ( { onClose, children } ) => (
43
- < div className = "notifications__notification" >
44
- < div className = "notifications__notification-content" > { children } </ div >
45
- < button className = "notifications__close" onClick = { onClose } > < Close /> </ button >
45
+ < div className = { styles . notification } >
46
+ < div className = { styles . notificationContent } > { children } </ div >
47
+ < button className = { styles . close } onClick = { onClose } > < Close /> </ button >
46
48
</ div >
47
49
) ;
48
50
Original file line number Diff line number Diff line change @@ -647,38 +647,3 @@ $header-transition: 0.2s ease-in-out;
647
647
}
648
648
}
649
649
}
650
-
651
- .notifications {
652
- position : absolute ;
653
- z-index : 10 ;
654
-
655
- $buffer : 0.5em ;
656
-
657
- bottom : $buffer ;
658
- left : $buffer ;
659
- right : $buffer ;
660
-
661
- margin-left : auto ;
662
- margin-right : auto ;
663
- max-width : 50em ;
664
-
665
- background : white ;
666
- border : 2px solid #428bca ;
667
-
668
- & __notification {
669
- display : flex ;
670
- }
671
-
672
- $space : 0.25em ;
673
-
674
- & __notification-content {
675
- padding : $space 0 $space $space ;
676
- }
677
-
678
- & __close {
679
- @include button-reset ;
680
- padding : $space ;
681
- background : #e1e1db ;
682
- cursor : pointer ;
683
- }
684
- }
Original file line number Diff line number Diff line change
1
+ .-buttonReset {
2
+ padding : 0 ;
3
+ border : none;
4
+ background : inherit;
5
+ background-color : transparent; /* IE 11 */
6
+ font : inherit;
7
+ line-height : inherit;
8
+ text-align : inherit;
9
+ }
You can’t perform that action at this time.
0 commit comments