make the landing page look beautiful 😍😍😍
This commit is contained in:
parent
a72ebe853f
commit
d36c98cb49
22 changed files with 481 additions and 29 deletions
28
src/hooks/dropzone.ts
Normal file
28
src/hooks/dropzone.ts
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { $, useSignal } from '@builder.io/qwik';
|
||||
|
||||
export const useDropzone = () => {
|
||||
const highlight = useSignal(false);
|
||||
|
||||
const onInputChange = $(async (e: Event) => {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
const fileInputRef = useSignal<HTMLInputElement | undefined>(undefined);
|
||||
|
||||
return {
|
||||
highlight,
|
||||
onDragOver: $((e: DragEvent) => {
|
||||
e.preventDefault();
|
||||
highlight.value = true;
|
||||
}),
|
||||
onDragLeave: $((e: DragEvent) => {
|
||||
e.preventDefault();
|
||||
highlight.value = false;
|
||||
}),
|
||||
onInputChange,
|
||||
triggerFileInput: $(() => {
|
||||
fileInputRef.value?.click();
|
||||
}),
|
||||
fileInputRef,
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue