Files
WRNexusJS/packages/ui/components/PublicPageShell.wrn
T
2026-08-01 01:09:58 +05:30

54 lines
1.5 KiB
Plaintext

component PublicPageShell {
props {
maxWidth: string = "full"
fullWidth: boolean = true
headerOffset: string = "none"
background: string = "default"
overflow: string = "clip"
minHeight: string = "screen"
size: string = "default"
color: string = "primary"
variant: string = "default"
class: string = ""
}
view {
<div
data-ui-component="PublicPageShell"
data-size='{size}'
data-color='{color}'
data-variant='{variant}'
class='relative isolate w-full text-[var(--wire-color-text)] {class}'
class:min-h-screen='minHeight === "screen"'
class:min-h-dvh='minHeight === "dvh"'
class:overflow-x-clip='overflow === "clip"'
class:overflow-x-hidden='overflow === "hidden"'
class:bg-[var(--wire-color-background)]='background === "default"'
class:bg-[var(--wire-color-surface-soft)]='background === "soft"'
class:bg-[var(--wire-color-surface-raised)]='background === "raised"'
class:pt-16='headerOffset === "sm"'
class:pt-20='headerOffset === "md"'
class:pt-24='headerOffset === "lg"'
>
<slot name="before"></slot>
{#if fullWidth}
<main class="w-full">
<slot></slot>
</main>
{:else}
<main
class="mx-auto w-full px-4 sm:px-6 lg:px-8"
class:max-w-5xl='maxWidth === "lg"'
class:max-w-7xl='maxWidth === "xl"'
class:max-w-screen-2xl='maxWidth === "2xl"'
>
<slot></slot>
</main>
{/if}
<slot name="after"></slot>
</div>
}
}