Class

CustomUpload

CustomUpload(props) → {React.ReactElement}

Constructor

# new CustomUpload(props) → {React.ReactElement}

Overview

The component consists of input and label tags that are connected by id and htmlFor attributes. Input's display is set to none so that only label is visible.

Goal

The goal of this component is to enable any passed children to serve as an upload button.
Parameters:
Name Type Attributes Default Description
props Object

Any other props will be forwarded to the input element.

children React.ReactNode <optional>

The content of the component.

accept string <optional>
*

Specifies what file types the user can pick from the file input dialog box

id string

The id attributes of an input element and htmlFor attributes of an label element.

onChange function <optional>

Callback fired when a file was chosen.

View Source Utils/Inputs/CustomUpload.js, line 33

React.ReactElement