diff --git a/packages/shared-ui/src/molecules/PageHeader.svelte b/packages/shared-ui/src/molecules/PageHeader.svelte index c2a138530..45a574c64 100644 --- a/packages/shared-ui/src/molecules/PageHeader.svelte +++ b/packages/shared-ui/src/molecules/PageHeader.svelte @@ -53,6 +53,8 @@ size?: HeaderSize; /** Whether to show bottom border */ bordered?: boolean; + /** Center the title (with actions on the right, back on the left) */ + centered?: boolean; /** Back navigation href (shows back arrow button) */ backHref?: string; /** Icon snippet (before title) */ @@ -72,6 +74,7 @@ description, size = 'md', bordered = false, + centered = false, backHref, icon, breadcrumb, @@ -103,18 +106,23 @@ > {#if breadcrumb} -
+
{@render breadcrumb()}
{/if} -
-
- + {#if centered} + +
+ {#if backHref} @@ -128,16 +136,14 @@ {/if} - - {#if icon} -
- {@render icon()} -
- {/if} - - -
-

+ +
+ {#if icon} +
+ {@render icon()} +
+ {/if} +

{title}

{#if description} @@ -146,15 +152,64 @@ {/if}
-

- - {#if actions} -
- {@render actions()} + + {#if actions} +
+ {@render actions()} +
+ {/if} +
+ {:else} + +
+
+ + {#if backHref} + + + + + + {/if} + + + {#if icon} +
+ {@render icon()} +
+ {/if} + + +
+

+ {title} +

+ {#if description} + + {description} + + {/if} +
- {/if} -
+ + + {#if actions} +
+ {@render actions()} +
+ {/if} +
+ {/if} {#if tabs}