mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 09:15:05 +03:00
refactor: layout components (#18290)
This commit is contained in:
@@ -1,26 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { Container, Scrollable, type Size } from '@immich/ui';
|
||||
import { Container } from '@immich/ui';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
interface Props {
|
||||
id?: string;
|
||||
title?: string;
|
||||
size?: Size | 'full';
|
||||
buttons?: Snippet;
|
||||
type Props = {
|
||||
children?: Snippet;
|
||||
}
|
||||
};
|
||||
|
||||
let { title, size, buttons, children, id }: Props = $props();
|
||||
const { children }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="h-full flex flex-col">
|
||||
<div class="flex h-16 w-full place-items-center justify-between border-b p-2">
|
||||
<div class="font-medium outline-none" tabindex="-1" {id}>{title}</div>
|
||||
{@render buttons?.()}
|
||||
</div>
|
||||
<Scrollable class="grow">
|
||||
<Container {size} class="flex flex-col p-4">
|
||||
{@render children?.()}
|
||||
</Container>
|
||||
</Scrollable>
|
||||
</div>
|
||||
<Container class="p-2 pb-16" {children} />
|
||||
|
||||
Reference in New Issue
Block a user