File tree Expand file tree Collapse file tree
platforms/metagram/src/lib/fragments/MessageInput Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 ... restProps
2727 }: IMessageInputProps = $props ();
2828
29+ let fileInput: HTMLInputElement | undefined = $state ();
30+
2931 const cBase = ' flex items-center justify-between gap-2' ;
3032 </script >
3133
5658 </div >
5759 {:else }
5860 <div class =" bg-grey flex aspect-square h-13 w-13 items-center justify-center rounded-full" >
59- <input id =" add-image" type =" file" class =" hidden" accept =" image/*" bind:files />
61+ <input
62+ id =" add-image"
63+ type =" file"
64+ class =" hidden"
65+ accept =" image/*"
66+ bind:files
67+ bind:this ={fileInput }
68+ />
6069 <button
6170 type =" button"
6271 class =" bg-grey flex aspect-square h-13 w-13 items-center justify-center rounded-full border-0 p-0"
63- onclick ={ handleSend }
64- aria-label = " Send message "
72+ aria-label = " add-image "
73+ onclick ={() => fileInput ?. click ()}
6574 >
66- <HugeiconsIcon size ="24px" icon ={ImageCompositionOvalIcon } color =" var(--color-black-400)" />
75+ <HugeiconsIcon
76+ size =" 24px"
77+ icon ={ImageCompositionOvalIcon }
78+ color =" var(--color-black-400)"
79+ />
6780 </button >
6881 </div >
6982 {/if }
You can’t perform that action at this time.
0 commit comments