@@ -56,7 +56,7 @@ export function Puck({
56
56
data : Data ;
57
57
ui ?: Partial < UiState > ;
58
58
onChange ?: ( data : Data ) => void ;
59
- onPublish : ( data : Data ) => void ;
59
+ onPublish ? : ( data : Data ) => void ;
60
60
plugins ?: Plugin [ ] ;
61
61
customUi ?: Partial < CustomUi > ;
62
62
renderComponentList ?: ( props : {
@@ -392,7 +392,7 @@ export function Puck({
392
392
< CustomHeaderActions />
393
393
< Button
394
394
onClick = { ( ) => {
395
- onPublish ( data ) ;
395
+ onPublish && onPublish ( data ) ;
396
396
} }
397
397
icon = { < Globe size = "14px" /> }
398
398
>
@@ -425,55 +425,16 @@ export function Puck({
425
425
</ IconButton >
426
426
</ div >
427
427
</ div >
428
- < < << << < HEAD
429
- < div className = { getClassName ( "rightSideBarToggle" ) } >
430
- < IconButton
431
- onClick = { ( ) => {
432
- toggleSidebars ( "right" ) ;
433
- } }
434
- title = "Toggle right sidebar"
435
- >
436
- < Sidebar focusable = "false" />
437
- </ IconButton >
438
- </ div >
439
- </ div >
440
- < div className = { getClassName ( "headerTitle" ) } >
441
- < Heading rank = { 2 } size = "xs" >
442
- { headerTitle || rootProps . title || "Page" }
443
- { headerPath && (
444
- < >
445
- { " " }
446
- < code className = { getClassName ( "headerPath" ) } >
447
- { headerPath }
448
- </ code >
449
- </ >
450
- ) }
451
- </ Heading >
452
- </ div >
453
- < div className = { getClassName ( "headerTools" ) } >
454
- < div className = { getClassName ( "menuButton" ) } >
455
- < IconButton
456
- onClick = { ( ) => {
457
- return setMenuOpen ( ! menuOpen ) ;
458
- } }
459
- title = "Toggle menu bar"
460
- >
461
- { menuOpen ? (
462
- < ChevronUp focusable = "false" />
463
- ) : (
464
- < ChevronDown focusable = "false" />
465
- === = ===
466
428
< div className = { getClassName ( "headerTitle" ) } >
467
429
< Heading rank = { 2 } size = "xs" >
468
- { headerTitle || data . root . props . title || "Page" }
430
+ { headerTitle || rootProps . title || "Page" }
469
431
{ headerPath && (
470
432
< >
471
433
{ " " }
472
434
< code className = { getClassName ( "headerPath" ) } >
473
435
{ headerPath }
474
436
</ code >
475
437
</ >
476
- >>> > >>> b9c0ed2 ( feat : introduce UI overrides API )
477
438
) }
478
439
</ Heading >
479
440
</ div >
0 commit comments