From 86dd44adb7812e1f18972c1f714d7e0b1452f441 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Mon, 31 Jul 2023 10:53:00 -0700 Subject: [PATCH] feat: add community sidebar --- src/lib/components/input/Button.svelte | 42 ++++++++++++++------- src/routes/+layout.svelte | 51 +++++++++++++++++++++----- 2 files changed, 69 insertions(+), 24 deletions(-) diff --git a/src/lib/components/input/Button.svelte b/src/lib/components/input/Button.svelte index 0a09281e..40ec7b30 100644 --- a/src/lib/components/input/Button.svelte +++ b/src/lib/components/input/Button.svelte @@ -4,6 +4,13 @@ type ButtonColor = keyof typeof buttonColor type ButtonSize = keyof typeof buttonSize type ButtonRoundness = keyof typeof buttonRoundness + type ButtonAlignment = keyof typeof buttonAlignment + + const buttonAlignment = { + left: 'justify-start text-left', + center: 'justify-center text-center', + right: 'justify-end text-right', + } const buttonColor = { primary: `border border-slate-900 bg-slate-900 dark:bg-zinc-100 @@ -51,6 +58,7 @@ export let color: ButtonColor = 'secondary' export let size: ButtonSize = 'md' export let rounded: ButtonRoundness = 'md' + export let alignment: ButtonAlignment = 'center' // const dispatch = createEventDispatcher() export let href: string | undefined = undefined @@ -60,20 +68,24 @@ -
+
{#if loading} -
+
{#if loading} - - - -
- -
+
+ + + +
+ +
+ +
+
+