Within the React site, there is a field where users can select a file from their computer and view the file path.
To achieve this functionality, I used an HTML input with type="file"...
<div className="inline-flex w-full justify-between">
<input
id="fileInput"
onChange={chooceFile}
type="file"
className={clsxm(
'w-full text-sm',
'text-[#FFFFFF] file:float-right file:mr-0 file:text-[#FFFFFF]',
'file:bg-[grey]',
'file:px-3 file:text-xs',
'file:font-medium '
)}
/>
</div>
...and I need assistance in customizing this field. Specifically, I have two questions:
- How can I change the default button label from "Choose File" to "Any text"?
- How do I alter the default label displayed when no file is selected from "No file chosen" to "Please choose a file"?