File tree Expand file tree Collapse file tree 3 files changed +79
-7
lines changed
infrastructure/eid-wallet/src/routes Expand file tree Collapse file tree 3 files changed +79
-7
lines changed Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ import type { Snippet } from " svelte" ;
3
+ import type { LayoutData } from " ./$types" ;
4
+
5
+ let { data, children }: { data: LayoutData ; children: Snippet } = $props ();
6
+ </script >
7
+
8
+ <div class =" p-6 mb-16" >
9
+ {@render children ()}
10
+ </div >
Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ import { Hero , IdentityCard } from " $lib/fragments" ;
3
+ import * as Button from " $lib/ui/Button" ;
4
+ import { QrCodeIcon } from " @hugeicons/core-free-icons" ;
5
+ import { HugeiconsIcon } from " @hugeicons/svelte" ;
6
+ import type { Snippet } from " svelte" ;
7
+
8
+ const dummyData = {
9
+ Name: " John Doe" ,
10
+ " Date of birth" : " 01/01/1990" ,
11
+ " ID submitted" : " American Passport" ,
12
+ " Passport number" : " 123456789" ,
13
+ };
14
+ </script >
15
+
16
+
17
+ <Hero
18
+ title =" Good morning!"
19
+ subtitle =" Don't forget to drink water."
20
+ showSettings
21
+ />
22
+
23
+ {#snippet Section (title : string , children : Snippet )}
24
+ <section class =" mt-8" >
25
+ <h4 class ="mb-2" >{title }</h4 >
26
+ {@render children ()}
27
+ </section >
28
+ {/ snippet }
29
+
30
+ {#snippet eName ()}
31
+ <IdentityCard
32
+ variant =" eName"
33
+ userId =" 1234567890"
34
+ viewBtn ={() => alert (" View button clicked!" )}
35
+ shareBtn ={() => alert (" Share button clicked!" )}
36
+ />
37
+ {/ snippet }
38
+ {#snippet ePassport ()}
39
+ <IdentityCard
40
+ variant =" ePassport"
41
+ viewBtn ={() => alert (" View button clicked!" )}
42
+ userData ={dummyData }
43
+ />
44
+ {/ snippet }
45
+ {#snippet eVault ()}
46
+ <IdentityCard
47
+ variant =" eVault"
48
+ usedStorage ={15 }
49
+ totalStorage ={100 }
50
+ />
51
+ {/ snippet }
52
+
53
+ {@render Section (" eName" , eName )}
54
+ {@render Section (" ePassport" , ePassport )}
55
+ {@render Section (" eVault" , eVault )}
56
+
57
+ <Button .Action
58
+ variant =" solid"
59
+ onclick ={() => alert (" Action button clicked!" )}
60
+ class =" mx-auto text-nowrap flex gap-8 fixed bottom-5 left-1/2 -translate-x-1/2 z-10"
61
+ >
62
+ <HugeiconsIcon
63
+ size ={32 }
64
+ strokeWidth ={2 }
65
+ className =" mr-2"
66
+ icon ={QrCodeIcon }
67
+ />
68
+ Scan to Login
69
+ </Button .Action >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments