mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-12 21:08:46 +00:00
FloatingActionButton 컴포넌트 리팩토링 2
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
import { AdaptiveDiv } from "$lib/components/atoms";
|
||||
|
||||
interface Props {
|
||||
class: ClassValue;
|
||||
icon: Component<SvelteHTMLElements["svg"]>;
|
||||
offset: ClassValue;
|
||||
onclick?: () => void;
|
||||
}
|
||||
|
||||
let { icon: Icon, offset, onclick }: Props = $props();
|
||||
let { class: className, icon: Icon, onclick }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="pointer-events-none fixed inset-0">
|
||||
@@ -17,11 +17,11 @@
|
||||
<button
|
||||
onclick={onclick && (() => setTimeout(onclick, 100))}
|
||||
class={[
|
||||
"pointer-events-auto absolute bottom-4 right-4 flex h-14 w-14 items-center justify-center rounded-full bg-gray-300 shadow-lg transition active:scale-95 active:bg-gray-400",
|
||||
offset,
|
||||
"pointer-events-auto absolute flex h-14 w-14 items-center justify-center rounded-full bg-gray-300 text-xl shadow-lg transition active:scale-95 active:bg-gray-400",
|
||||
className,
|
||||
]}
|
||||
>
|
||||
<Icon class="text-xl" />
|
||||
<Icon />
|
||||
</button>
|
||||
</AdaptiveDiv>
|
||||
</div>
|
||||
|
||||
@@ -110,11 +110,11 @@
|
||||
</div>
|
||||
|
||||
<FloatingButton
|
||||
offset="bottom-24 right-4"
|
||||
icon={IconAdd}
|
||||
onclick={() => {
|
||||
isEntryCreateBottomSheetOpen = true;
|
||||
}}
|
||||
class="bottom-24 right-4"
|
||||
/>
|
||||
<EntryCreateBottomSheet
|
||||
bind:isOpen={isEntryCreateBottomSheetOpen}
|
||||
|
||||
Reference in New Issue
Block a user