File tree Expand file tree Collapse file tree 3 files changed +77
-0
lines changed
src/stories/Library/Modals/modal-profile Expand file tree Collapse file tree 3 files changed +77
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,31 @@ export default {
2424 control : { type : "text" } ,
2525 defaultValue : "Se din profil" ,
2626 } ,
27+ notifications : {
28+ control : { type : "object" } ,
29+ defaultValue : [
30+ {
31+ label : {
32+ label : "overskredet" ,
33+ status : "danger" ,
34+ } ,
35+ number : {
36+ label : 2 ,
37+ status : "danger" ,
38+ } ,
39+ title : "Afleveret for sent" ,
40+ showDot : true ,
41+ } ,
42+ {
43+ number : {
44+ label : 2 ,
45+ status : "warning" ,
46+ } ,
47+ title : "Lån overskredet" ,
48+ showDot : true ,
49+ } ,
50+ ] ,
51+ } ,
2752 profileNavLinks : {
2853 control : { type : "object" } ,
2954 defaultValue : [
Original file line number Diff line number Diff line change @@ -4,12 +4,17 @@ import { ModalHeader } from "../modal-header/ModalHeader";
44import { ModalCloseButton , ModalFallbackButton } from "../ModalShared" ;
55import { Button } from "../../Buttons/button/Button" ;
66import { LinkFilters , LinkFilter } from "../../link-filters/LinkFilters" ;
7+ import {
8+ ListDashboard ,
9+ ListDashboardProps ,
10+ } from "../../Lists/list-dashboard/ListDashboard" ;
711
812export type ModalProfileProps = {
913 showModal : boolean ;
1014 headerName : string ;
1115 headerLinkHref : string ;
1216 headerLinkText : string ;
17+ notifications : ListDashboardProps [ ] ;
1318 profileNavLinks : LinkFilter [ ] ;
1419} ;
1520
@@ -18,6 +23,7 @@ export const ModalProfile: React.FC<ModalProfileProps> = ({
1823 headerName,
1924 headerLinkHref,
2025 headerLinkText,
26+ notifications,
2127 profileNavLinks,
2228} ) => {
2329 const [ shownModal , setShownModal ] = useState ( showModal ) ;
@@ -55,6 +61,19 @@ export const ModalProfile: React.FC<ModalProfileProps> = ({
5561 headerLinkText = { headerLinkText }
5662 />
5763
64+ < div className = "modal-profile__notifications" >
65+ { notifications . map ( ( item , index ) => (
66+ < div key = { index } className = "modal-profile__notification-item" >
67+ < ListDashboard
68+ title = { item . title }
69+ number = { item . number }
70+ label = { item . label }
71+ showDot = { item . showDot }
72+ />
73+ </ div >
74+ ) ) }
75+ </ div >
76+
5877 < div className = "modal-profile__container" >
5978 < div className = "modal-profile__links" >
6079 < LinkFilters filters = { profileNavLinks } />
Original file line number Diff line number Diff line change 11.modal-profile {
22 flex-direction : column ;
33
4+ & __notifications {
5+ border-bottom : 1px solid $c-global-tertiary-1 ;
6+
7+ padding : 32px ;
8+
9+ @include breakpoint-s {
10+ padding : {
11+ top : 40px ;
12+ right : 80px ;
13+ bottom : 40px ;
14+ left : 80px ;
15+ }
16+ }
17+ }
18+
19+ & __notification-item {
20+ margin-bottom : 8px ;
21+ }
22+
23+ & __notification-item .list-dashboard {
24+ padding : 8px ;
25+ }
26+
27+ & __notification-item .number {
28+ min-width : 40px ;
29+ width : 40px ;
30+ height : 40px ;
31+ }
32+
433 & __container {
534 height : 100% ;
635 display : flex ;
3463 }
3564 }
3665}
66+
67+ .test-color {
68+ color : red ;
69+ }
You can’t perform that action at this time.
0 commit comments