flotilla/src/lib/components/PageContent.svelte

22 lines
505 B
Svelte
Raw Normal View History

2025-03-19 17:30:36 +00:00
<script lang="ts">
import cx from "classnames"
2025-03-19 17:30:36 +00:00
import type {Snippet} from "svelte"
interface Props {
element?: Element
children?: Snippet
[key: string]: any
}
let {children, element = $bindable(), ...props}: Props = $props()
const className = cx(
props.class,
"scroll-container cw cb ct fixed z-feature overflow-y-auto overflow-x-hidden",
)
2025-03-19 17:30:36 +00:00
</script>
<div {...props} bind:this={element} data-component="PageContent" class={className}>
2025-03-19 17:30:36 +00:00
{@render children?.()}
</div>