diff --git a/frontend/src/lib/components/common/button/Button.svelte b/frontend/src/lib/components/common/button/Button.svelte
index 33447c78e5..da23d59cd6 100644
--- a/frontend/src/lib/components/common/button/Button.svelte
+++ b/frontend/src/lib/components/common/button/Button.svelte
@@ -1,29 +1,31 @@
-{#if href}
-
-{:else}
-
-{/if}
+
+ {#if startIcon}
+
+ {/if}
+ {#if !iconOnly}
+
+ {/if}
+ {#if endIcon}
+
+ {/if}
+
diff --git a/frontend/src/lib/components/common/button/ButtonPopup.svelte b/frontend/src/lib/components/common/button/ButtonPopup.svelte
new file mode 100644
index 0000000000..b53594a0c9
--- /dev/null
+++ b/frontend/src/lib/components/common/button/ButtonPopup.svelte
@@ -0,0 +1,72 @@
+
+
+
+ {#if $$slots.main}
+
+ {/if}
+
+
+
+
+{#if ref}
+
+
+
+{/if}
diff --git a/frontend/src/lib/components/common/button/ButtonPopupItem.svelte b/frontend/src/lib/components/common/button/ButtonPopupItem.svelte
new file mode 100644
index 0000000000..a965e6c292
--- /dev/null
+++ b/frontend/src/lib/components/common/button/ButtonPopupItem.svelte
@@ -0,0 +1,52 @@
+
+
+
+
+
diff --git a/frontend/src/lib/components/common/button/model.ts b/frontend/src/lib/components/common/button/model.ts
index 1f3a4e808f..4276b24c99 100644
--- a/frontend/src/lib/components/common/button/model.ts
+++ b/frontend/src/lib/components/common/button/model.ts
@@ -1,6 +1,44 @@
-export namespace Button {
+export namespace ButtonType {
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
export type Color = 'blue' | 'red' | 'dark' | 'light'
export type Variant = 'contained' | 'border'
export type Target = '_self' | '_blank'
+ export type Element = HTMLButtonElement | HTMLAnchorElement
+ export interface Icon {
+ icon: any
+ classes?: string
+ }
+
+ export const FontSizeClasses: Record = {
+ xs: 'text-xs',
+ sm: 'text-sm',
+ md: 'text-md',
+ lg: 'text-lg',
+ xl: 'text-xl'
+ } as const
+
+ export const SpacingClasses: Record = {
+ xs: 'px-3 py-1.5',
+ sm: 'px-3 py-1.5',
+ md: 'px-4 py-2',
+ lg: 'px-4 py-2',
+ xl: 'px-4 py-2'
+ } as const
+
+ export const IconScale: Record = {
+ xs: 0.7,
+ sm: 0.8,
+ md: 1,
+ lg: 1.1,
+ xl: 1.2
+ } as const
+
+ // ButtonPopup types
+
+ export const ItemContextKey = 'popupItemProps' as const
+
+ export interface ItemProps {
+ size: Size
+ color: Color
+ }
}
diff --git a/frontend/src/lib/components/common/drawer/Drawer.svelte b/frontend/src/lib/components/common/drawer/Drawer.svelte
index ec94a39440..961546ee1f 100644
--- a/frontend/src/lib/components/common/drawer/Drawer.svelte
+++ b/frontend/src/lib/components/common/drawer/Drawer.svelte
@@ -31,6 +31,8 @@
open = !open
}
+ $: open ? dispatch('open') : dispatch('close')
+
onMount(() => {
mounted = true
scrollLock(open)
diff --git a/frontend/src/lib/components/common/drawer/DrawerContent.svelte b/frontend/src/lib/components/common/drawer/DrawerContent.svelte
index 4bcfcc294c..0a474356fc 100644
--- a/frontend/src/lib/components/common/drawer/DrawerContent.svelte
+++ b/frontend/src/lib/components/common/drawer/DrawerContent.svelte
@@ -7,7 +7,7 @@
const dispatch = createEventDispatcher()
-
+
{title}
-
-
+ -->