File tree 6 files changed +143
-1
lines changed
6 files changed +143
-1
lines changed Original file line number Diff line number Diff line change @@ -672,6 +672,7 @@ footer {
672
672
align-items : center ;
673
673
justify-content : center ;
674
674
transition : $transition ;
675
+ color : $secondaryTextColor ;
675
676
& :hover {
676
677
background : $primaryColor ;
677
678
* {
@@ -887,3 +888,73 @@ footer {
887
888
}
888
889
}
889
890
}
891
+ .modal-backdrop {
892
+ background : rgb ($color : $darkTextColor , $alpha : 0.4 );
893
+ }
894
+ .modal {
895
+ opacity : 0 ;
896
+ transition : $transition ;
897
+ & .in {
898
+ opacity : 1 ;
899
+ }
900
+ .close {
901
+ color : $secondaryTextColor ;
902
+ cursor : pointer ;
903
+ font-size : 20px ;
904
+ margin-right : 10px ;
905
+ }
906
+ .modal-title {
907
+ font-size : 18px ;
908
+ font-weight : 700 ;
909
+ }
910
+ .modal-header {
911
+ border : 0 ;
912
+ }
913
+ .modal-body {
914
+ margin-bottom : 10px ;
915
+ }
916
+ .modal-content {
917
+ padding : 10px 15px ;
918
+ border : 0 !important ;
919
+ .indicator {
920
+ display : inline-block ;
921
+ width : 10px ;
922
+ height : 10px ;
923
+ background-color : $primaryColor ;
924
+ border-radius : 50% ;
925
+ }
926
+ }
927
+ .modal-footer {
928
+ .footer-text {
929
+ cursor : pointer ;
930
+ color : $primaryColor ;
931
+ font-size : 14px ;
932
+ }
933
+ }
934
+ }
935
+ .notification {
936
+ padding-bottom : 15px ;
937
+ padding-top : 15px ;
938
+ border-bottom : 1px solid $secondaryColor ;
939
+ transition : $transition ;
940
+ cursor : pointer ;
941
+
942
+ & :first-child {
943
+ padding-top : 0px ;
944
+ }
945
+ & :last-child {
946
+ border-bottom : 0 ;
947
+ }
948
+ & :hover {
949
+ padding : 15px ;
950
+ background-color : rgb ($color : $secondaryColor , $alpha : 0.3 );
951
+ }
952
+ .text {
953
+ color : $darkTextColor ;
954
+ }
955
+ .timestamp {
956
+ margin-top : 5px !important ;
957
+ color : $secondaryTextColor ;
958
+ font-size : 12px ;
959
+ }
960
+ }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const DashboardHeader = () => {
9
9
< DashboardHeaderUser />
10
10
</ div >
11
11
< div className = 'col d-flex align-items-center icons justify-content-end gap-4' >
12
- < i className = 'fal fa-bell' > </ i >
12
+ < i className = 'fal fa-bell' data-toggle = 'modal' data-target = '#notifications-modal' > </ i >
13
13
< span className = 'divider' > |</ span >
14
14
< i className = 'fal fa-cog' > </ i >
15
15
< RoundedPrimaryButton title = 'Logout' />
Original file line number Diff line number Diff line change
1
+ interface Props {
2
+ id : string ;
3
+ title ?: string ;
4
+ children ?: any ;
5
+ footerChildren ?: any ;
6
+ }
7
+
8
+ const Modal = ( props : Props ) => {
9
+ return (
10
+ < div className = 'modal' id = { props . id } tabIndex = { - 1 } role = 'dialog' >
11
+ < div className = 'modal-dialog' role = 'document' >
12
+ < div className = 'modal-content' >
13
+ < div className = 'modal-header' >
14
+ < p className = 'modal-title' > Notifications</ p >
15
+ < i className = 'close fa fa-times' data-dismiss = 'modal' > </ i >
16
+ </ div >
17
+ < div className = 'modal-body' > { props . children } </ div >
18
+ < div className = 'modal-footer justify-content-start mx-2' > { props . footerChildren } </ div >
19
+ </ div >
20
+ </ div >
21
+ </ div >
22
+ ) ;
23
+ } ;
24
+
25
+ export default Modal ;
Original file line number Diff line number Diff line change
1
+ import CircularIcon from 'components/common/CircularIcon' ;
2
+
3
+ const NotificationItem = ( ) => {
4
+ return (
5
+ < div className = 'notification' >
6
+ < div className = 'row' >
7
+ < div className = 'col-8' >
8
+ < div className = 'row' >
9
+ < div className = 'col-1' >
10
+ < span className = 'indicator' > </ span >
11
+ </ div >
12
+ < div className = 'col' >
13
+ < p className = 'text' > Your password has been changed successfully.</ p >
14
+ < p className = 'timestamp' > Jul 23, 2021 at 09:15 AM</ p >
15
+ </ div >
16
+ </ div >
17
+ </ div >
18
+ < div className = 'col-4 d-flex align-items-center justify-content-end' >
19
+ < CircularIcon iconClassName = 'fal fa-lock' />
20
+ </ div >
21
+ </ div >
22
+ </ div >
23
+ ) ;
24
+ } ;
25
+
26
+ export default NotificationItem ;
Original file line number Diff line number Diff line change
1
+ import Modal from 'components/shared/Modal' ;
2
+ import NotificationItem from './NotificationItem' ;
3
+
4
+ const NotificationsModal = ( ) => {
5
+ return (
6
+ < Modal
7
+ id = 'notifications-modal'
8
+ title = 'Notifications'
9
+ footerChildren = { < p className = 'footer-text' > View all notifications</ p > }
10
+ >
11
+ { [ 1 , 2 , 3 , 4 ] . map ( ( ) => (
12
+ < NotificationItem />
13
+ ) ) }
14
+ </ Modal >
15
+ ) ;
16
+ } ;
17
+
18
+ export default NotificationsModal ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import DashboardAccountTab from 'components/dashboard/DashboardAccountTab';
2
2
import DashboardHelpTab from 'components/dashboard/DashboardHelpTab' ;
3
3
import DashboardNavTabs from 'components/dashboard/DashboardNavTabs' ;
4
4
import DashboardPasswordTab from 'components/dashboard/DashboardPasswordTab' ;
5
+ import NotificationsModal from 'components/shared/NotificationsModal' ;
5
6
import DashboardLayout from './layouts/DashboardLayout' ;
6
7
7
8
const Dashboard = ( ) => {
@@ -21,6 +22,7 @@ const Dashboard = () => {
21
22
</ div >
22
23
</ div >
23
24
</ div >
25
+ < NotificationsModal />
24
26
</ DashboardLayout >
25
27
) ;
26
28
} ;
You can’t perform that action at this time.
0 commit comments