This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Styling input[type=file] #18
Comments
Can you show your full code? Whatever components you have inside of import { UploadField } from '@navjobs/upload'
<UploadField
onFiles={files => //files object here}
containerProps={{
className: 'resume_import'
}}
uploadProps={{
accept: '.pdf,.doc,.docx,.txt,.rtf',
}}
>
<div>
Click here to upload! This can be an image,
or any component you can dream of.
</div>
</UploadField> The div inside will be clickable everywhere. You should only place it around what you want clickable. |
Ah, I think I see. The upload field spans 100% height and width. You need to wrap it inside of something that is constrained to the height and width of your button. So like: <div style={{width: '50px', height: '50px'}}>
<UploadField
onFiles={files => //files object here}
containerProps={{
className: 'resume_import'
}}
uploadProps={{
accept: '.pdf,.doc,.docx,.txt,.rtf',
}}
>
<div>
Click here to upload! This can be an image,
or any component you can dream of.
</div>
</UploadField>
</div> |
Doh! |
Let me know if you need any more help, I'll close this :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Probably due to the css framework or some resetter I have the input with the following styles:
This means that wherever I click the upload is triggered.
How can I apply styles over the
<input/>
?I tried with
<UploadField style={{ width: 0, height: 0 }}
without success.The text was updated successfully, but these errors were encountered: