mirror of
https://github.com/Blah-IM/Weblah.git
synced 2025-09-18 07:45:22 +00:00
feat: basic settings layout
This commit is contained in:
parent
5c82a79b9c
commit
3097b8a9dd
8 changed files with 118 additions and 15 deletions
4
src/lib/components/GroupedList.ts
Normal file
4
src/lib/components/GroupedList.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
import GroupedListItem from './GroupedList/GroupedListItem.svelte';
|
||||
import GroupedListSection from './GroupedList/GroupedListSection.svelte';
|
||||
|
||||
export { GroupedListItem, GroupedListSection };
|
17
src/lib/components/GroupedList/GroupedListItem.svelte
Normal file
17
src/lib/components/GroupedList/GroupedListItem.svelte
Normal file
|
@ -0,0 +1,17 @@
|
|||
<script lang="ts">
|
||||
import { Icon, type IconSource } from 'svelte-hero-icons';
|
||||
|
||||
export let href: string | undefined = undefined;
|
||||
export let icon: IconSource | undefined = undefined;
|
||||
</script>
|
||||
|
||||
<svelte:element
|
||||
this={href ? 'a' : 'div'}
|
||||
{href}
|
||||
class="flex items-center gap-2 px-4 py-3 font-medium text-sf-primary"
|
||||
>
|
||||
{#if icon}
|
||||
<Icon src={icon} class="size-5 text-sf-secondary" mini />
|
||||
{/if}
|
||||
<slot />
|
||||
</svelte:element>
|
17
src/lib/components/GroupedList/GroupedListSection.svelte
Normal file
17
src/lib/components/GroupedList/GroupedListSection.svelte
Normal file
|
@ -0,0 +1,17 @@
|
|||
<section class="my-4 px-4">
|
||||
{#if $$slots.header}
|
||||
<h3 class="mb-1 truncate text-sm font-medium uppercase text-sf-secondary">
|
||||
<slot name="header" />
|
||||
</h3>
|
||||
{/if}
|
||||
<div
|
||||
class="divide-y-[0.5px] divide-ss-secondary rounded-lg border-[0.5px] border-ss-secondary bg-sb-primary shadow-sm"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
{#if $$slots.footer}
|
||||
<div class="mt-1 text-sm font-medium uppercase text-sf-secondary">
|
||||
<slot name="footer" />
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
|
@ -14,7 +14,7 @@
|
|||
{:else}
|
||||
<div
|
||||
class="box-border size-[--weblah-profile-pic-size] rounded-full border-2 border-dashed border-ss-primary"
|
||||
style:--weblah-profile-pic-size={`${size - 2}px`}
|
||||
style:--weblah-profile-pic-size={`${size}px`}
|
||||
aria-hidden
|
||||
/>
|
||||
<span class="sr-only">Account Unavailable</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue