@@ -21,25 +21,32 @@ def default
2121 # @param with_back_button [Boolean]
2222 # @param back_button_size [Symbol] select [small, medium, large]
2323 # @param with_breadcrumbs [Boolean]
24- # @param parent_link [Boolean]
24+ # @param with_actions [Boolean]
25+ # @param with_context_bar_actions [Boolean]
26+ # @param with_parent_link [Boolean]
2527 def playground (
2628 variant : :medium ,
2729 title : "Hello" ,
2830 description : "Last updated 5 minutes ago by XYZ." ,
2931 with_back_button : false ,
3032 back_button_size : :medium ,
3133 with_breadcrumbs : false ,
32- parent_link : false
34+ with_actions : false ,
35+ with_context_bar_actions : false ,
36+ with_parent_link : false
3337 )
3438 breadcrumb_items = [ { href : "/foo" , text : "Foo" } , { href : "/bar" , text : "Bar" } , "Baz" ]
3539
36- render ( Primer ::OpenProject ::PageHeader . new ) do |header |
37- header . with_title ( variant : variant ) { title }
38- header . with_description { description }
39- header . with_back_button ( href : "#" , size : back_button_size , 'aria-label' : "Back" ) if with_back_button
40- header . with_breadcrumbs ( breadcrumb_items ) if with_breadcrumbs
41- header . with_parent_link ( href : "#" ) { "Parent link" } if parent_link
42- end
40+ render_with_template ( locals : { variant : variant ,
41+ title : title ,
42+ description : description ,
43+ with_back_button : with_back_button ,
44+ back_button_size : back_button_size ,
45+ with_breadcrumbs : with_breadcrumbs ,
46+ with_parent_link : with_parent_link ,
47+ with_actions : with_actions ,
48+ with_context_bar_actions : with_context_bar_actions ,
49+ breadcrumb_items : breadcrumb_items } )
4350 end
4451
4552 # @label Large
0 commit comments