mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
add title to Button.svelte
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
hover_bg = get_shifted_color(bg, 100),
|
hover_bg = get_shifted_color(bg, 100),
|
||||||
active_bg = get_shifted_color(bg, 200),
|
active_bg = get_shifted_color(bg, 200),
|
||||||
disabled = false,
|
disabled = false,
|
||||||
|
title = '',
|
||||||
click_function = (e: MouseEvent) => {},
|
click_function = (e: MouseEvent) => {},
|
||||||
menu_options = null,
|
menu_options = null,
|
||||||
children
|
children
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
hover_bg?: string;
|
hover_bg?: string;
|
||||||
active_bg?: string;
|
active_bg?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
title?: string;
|
||||||
click_function?: (e: MouseEvent) => void;
|
click_function?: (e: MouseEvent) => void;
|
||||||
menu_options?: MenuOption[] | null;
|
menu_options?: MenuOption[] | null;
|
||||||
children?: any;
|
children?: any;
|
||||||
@@ -124,7 +126,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="relative">
|
<div class="relative" {title}>
|
||||||
<button
|
<button
|
||||||
bind:this={button_element}
|
bind:this={button_element}
|
||||||
class="{className} {menu_shown ? hover_bg : bg} {disabled
|
class="{className} {menu_shown ? hover_bg : bg} {disabled
|
||||||
|
|||||||
Reference in New Issue
Block a user