File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
apps/svelte.dev/src/routes/packages Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 11
11
let { title, description, packages }: Props = $props ();
12
12
13
13
const INITIAL_ITEMS = 3 ;
14
- let showAll = $state (false );
15
14
</script >
16
15
17
16
<section class =" category" >
38
37
<span class =" icon" ></span >
39
38
</span >
40
39
41
- <span >
42
- {showAll ? ' show less' : ` show all (${packages .length }) ` }
43
- </span >
40
+ <span class ="show-more" >show all ({packages .length })</span >
41
+ <span class =" show-less" >show less</span >
44
42
</summary >
45
43
46
44
<div class =" grid" >
101
99
width : 100% ;
102
100
justify-content : flex-end ;
103
101
102
+ .show-more {
103
+ display : block ;
104
+
105
+ [open ] & {
106
+ display : none ;
107
+ }
108
+ }
109
+
110
+ .show-less {
111
+ display : none ;
112
+
113
+ [open ] & {
114
+ display : block ;
115
+ }
116
+ }
117
+
104
118
.icon {
105
119
mask-size : 2rem ;
106
120
mask-image : url (icons/plus );
You can’t perform that action at this time.
0 commit comments