how to make a custom styled UploadButton

export const UploadImage = () => {
return (
<div className="flex flex-col items-center justify-between p-4">
<UploadButton
endpoint="postImage"
onClientUploadComplete={(res) => {
toast.success('Image uploaded successfully! 😄');
}}
onUploadError={(error: Error) => {
toast.error(error.message + " 😭");
}}
/>
</div>
)
};
export const UploadImage = () => {
return (
<div className="flex flex-col items-center justify-between p-4">
<UploadButton
endpoint="postImage"
onClientUploadComplete={(res) => {
toast.success('Image uploaded successfully! 😄');
}}
onUploadError={(error: Error) => {
toast.error(error.message + " 😭");
}}
/>
</div>
)
};
My goal is to use an icon <BsImage /> instead of the button and to be able to select a file then upon a function running the upload being called. Thanks in advance 😄
3 Replies
toadmilk
toadmilkOP•2y ago
plz
Dylz
Dylz•2y ago
please provide more info. What library is this using?
toadmilk
toadmilkOP•2y ago
uploadthing
Want results from more Discord servers?
Add your server