File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
pgml-dashboard/src/components/accordian Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ pub struct Accordian {
11
11
html_contents : Vec < String > ,
12
12
html_titles : Vec < String > ,
13
13
selected : usize ,
14
+ small_titles : bool ,
14
15
}
15
16
16
17
impl Accordian {
@@ -19,6 +20,7 @@ impl Accordian {
19
20
html_contents : Vec :: new ( ) ,
20
21
html_titles : Vec :: new ( ) ,
21
22
selected : 0 ,
23
+ small_titles : false ,
22
24
}
23
25
}
24
26
@@ -31,6 +33,11 @@ impl Accordian {
31
33
self . html_titles = html_titles. into_iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ;
32
34
self
33
35
}
36
+
37
+ pub fn small_titles ( mut self , small_titles : bool ) -> Self {
38
+ self . small_titles = small_titles;
39
+ self
40
+ }
34
41
}
35
42
36
43
component ! ( Accordian ) ;
Original file line number Diff line number Diff line change 5
5
< div class ="accordian-item ">
6
6
< div class ="accordian-header <% if i == selected { %> selected <% } %> " data-action ="click->accordian#titleClick " data-value ="accordian-body<%= i %> ">
7
7
< div class ="d-flex justify-content-between align-items-center w-100 ">
8
+ < % if small_titles {%>
9
+ < h6 class ="mb-0 "> < %- html_titles[i] %> </ h6 >
10
+ < % } else { %>
8
11
< h4 class ="mb-0 "> < %- html_titles[i] %> </ h4 >
12
+ < % } %>
9
13
< span class ="add material-symbols-outlined "> add</ span >
10
14
< span class ="remove material-symbols-outlined "> remove</ span >
11
15
</ div >
You can’t perform that action at this time.
0 commit comments