diff options
Diffstat (limited to 'src/components/FileUpload/FileUpload.tsx')
-rw-r--r-- | src/components/FileUpload/FileUpload.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/FileUpload/FileUpload.tsx b/src/components/FileUpload/FileUpload.tsx index dca70b1..67d280d 100644 --- a/src/components/FileUpload/FileUpload.tsx +++ b/src/components/FileUpload/FileUpload.tsx @@ -35,9 +35,10 @@ const FileUpload: React.FC<PropTypes> = ({ callback, children }) => { return ( <> <HiddenFileInput accept=".jpg, .jpeg, .png, .gif" multiple={false} /> - {React.isValidElement(child) - ? React.cloneElement(child, { onClick }) - : defaultButton + { + React.isValidElement(child) + ? React.cloneElement(child, { onClick }) + : defaultButton } </> ); |