@@ -22,16 +22,17 @@ def playground(
2222 show_filter_button : true ,
2323 show_quick_filter : true ,
2424 show_action_button : true ,
25- collapsed_search : false ,
25+ collapsed_search : true ,
2626 text : nil ,
2727 value : nil
2828 )
29- render_with_template ( locals : { show_filter_input : show_filter_input ,
30- show_clear_button : show_clear_button ,
31- show_filter_button : show_filter_button ,
32- show_quick_filter : show_quick_filter ,
33- show_action_button : show_action_button ,
34- collapsed_search : collapsed_search ,
29+ bool = ActiveModel ::Type ::Boolean . new
30+ render_with_template ( locals : { show_filter_input : bool . cast ( show_filter_input ) ,
31+ show_clear_button : bool . cast ( show_clear_button ) ,
32+ show_filter_button : bool . cast ( show_filter_button ) ,
33+ show_quick_filter : bool . cast ( show_quick_filter ) ,
34+ show_action_button : bool . cast ( show_action_button ) ,
35+ collapsed_search : bool . cast ( collapsed_search ) ,
3536 text : text ,
3637 value : value } )
3738 end
@@ -42,7 +43,6 @@ def default
4243 component . with_filter_input ( name : "filter" , label : "Filter" )
4344 component . with_filter_button do |button |
4445 button . with_trailing_visual_counter ( count : "15" )
45- "Filter"
4646 end
4747
4848 component . with_action_button ( leading_icon : :plus , label : "Create" , scheme : :primary ) do
@@ -93,11 +93,11 @@ def segmented_control
9393 end
9494 end
9595
96- # @label With collapsed search
97- def collapsed_search
98- render ( Primer ::OpenProject ::SubHeader . new ( collapsed_search : true ) ) do |component |
96+ # @label With expanded search
97+ def expanded_search
98+ render ( Primer ::OpenProject ::SubHeader . new ( collapsed_search : false ) ) do |component |
9999 component . with_filter_input ( name : "filter" , label : "Filter" )
100- component . with_filter_button do |button |
100+ component . with_filter_button ( scheme : :default ) do |button |
101101 button . with_trailing_visual_counter ( count : "15" )
102102 "Filter"
103103 end
0 commit comments