Use the ImageUploadInput
component to render a checkbox input:
import { ImageUploadInput } from '~/core/ui/ImageUploadInput';
import { Label } from '~/core/ui/Label';
<Label>
Avatar
<ImageUploadInput>
Load an image from your computer
</ImageUploadInput>
</Label>
Props
The component, in addition to all the properties of the HTML input
element, accepts the following props:
image
- an initial image to display in the component (the URL of the image)onClear
- a callback function to be called when the user clicks the clear button