File tree Expand file tree Collapse file tree 3 files changed +46
-2
lines changed
src/stories/Library/Lists/list-empty Expand file tree Collapse file tree 3 files changed +46
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,19 @@ export default {
1111 defaultValue : "Du har i øjeblikket 0 Reserveringer" ,
1212 control : "text" ,
1313 } ,
14+ links : {
15+ control : "object" ,
16+ defaultValue : [
17+ {
18+ linkText : "link tekst 1" ,
19+ href : "https://example.com/" ,
20+ } ,
21+ {
22+ linkText : "link tekst 2" ,
23+ href : "https://example.com/" ,
24+ } ,
25+ ] ,
26+ } ,
1427 } ,
1528 parameters : {
1629 design : {
Original file line number Diff line number Diff line change 1+ import { Links , LinksProps } from "../../links/Links" ;
2+
13interface ListEmptyProps {
24 text : string ;
5+ links ?: LinksProps [ ] ;
36}
47
5- const ListEmpty = ( { text } : ListEmptyProps ) => {
6- return < div className = "dpl-list-empty" > { text } </ div > ;
8+ const ListEmpty = ( { text, links } : ListEmptyProps ) => {
9+ return (
10+ < div className = "dpl-list-empty" >
11+ < div className = "dpl-list-empty__text" > { text } </ div >
12+ { links && (
13+ < div className = "dpl-list-empty__links" >
14+ { links . map ( ( item , index ) => (
15+ < div key = { index } className = "dpl-list-empty__link-item" >
16+ < Links
17+ linkText = { item . linkText }
18+ href = { item . href }
19+ classNames = { item . classNames }
20+ />
21+ </ div >
22+ ) ) }
23+ </ div >
24+ ) }
25+ </ div >
26+ ) ;
727} ;
828
929export default ListEmpty ;
Original file line number Diff line number Diff line change 33 width : 100% ;
44 background-color : transparent ;
55 display : flex ;
6+ flex-direction : column ;
67 justify-content : center ;
78 align-items : center ;
89 border : 1px dotted $c-text-secondary-gray ;
1112 @extend .pt-48 ;
1213 @extend .pb-48 ;
1314 @extend .text-body-large ;
15+
16+ & __text {
17+ @extend .pb-48 ;
18+ }
19+
20+ & __links {
21+ display : flex ;
22+ flex-direction : row ;
23+ column-gap : $s-lg ;
24+ }
1425}
You can’t perform that action at this time.
0 commit comments