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 {
1111 html_contents : Vec < String > ,
1212 html_titles : Vec < String > ,
1313 selected : usize ,
14+ small_titles : bool ,
1415}
1516
1617impl Accordian {
@@ -19,6 +20,7 @@ impl Accordian {
1920 html_contents : Vec :: new ( ) ,
2021 html_titles : Vec :: new ( ) ,
2122 selected : 0 ,
23+ small_titles : false ,
2224 }
2325 }
2426
@@ -31,6 +33,11 @@ impl Accordian {
3133 self . html_titles = html_titles. into_iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ;
3234 self
3335 }
36+
37+ pub fn small_titles ( mut self , small_titles : bool ) -> Self {
38+ self . small_titles = small_titles;
39+ self
40+ }
3441}
3542
3643component ! ( Accordian ) ;
Original file line number Diff line number Diff line change 55 < div class ="accordian-item ">
66 < div class ="accordian-header <% if i == selected { %> selected <% } %> " data-action ="click->accordian#titleClick " data-value ="accordian-body<%= i %> ">
77 < 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 { %>
811 < h4 class ="mb-0 "> < %- html_titles[i] %> </ h4 >
12+ < % } %>
913 < span class ="add material-symbols-outlined "> add</ span >
1014 < span class ="remove material-symbols-outlined "> remove</ span >
1115 </ div >
You can’t perform that action at this time.
0 commit comments