카테고리 페이지 구현 (WiP)

아직은 하위 카테고리의 목록만 볼 수 있습니다.
This commit is contained in:
static
2025-01-21 16:07:23 +09:00
parent 2993593770
commit efe2782db0
9 changed files with 322 additions and 8 deletions

View File

@@ -7,16 +7,20 @@
children?: Snippet;
onback?: () => void;
title?: string;
xPadding?: boolean;
}
let { children, onback, title }: Props = $props();
let { children, onback, title, xPadding = false }: Props = $props();
const back = $derived(() => {
setTimeout(onback || (() => history.back()), 100);
});
</script>
<div class="sticky top-0 z-10 flex flex-shrink-0 items-center justify-between bg-white py-4">
<div
class="sticky top-0 z-10 flex flex-shrink-0 items-center justify-between bg-white py-4
{xPadding ? 'px-4' : ''}"
>
<button onclick={back} class="w-[2.3rem] flex-shrink-0 rounded-full p-1 active:bg-gray-100">
<IconArrowBack class="text-2xl" />
</button>