diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/AttachLink/AttachLink.tsx | 9 | ||||
-rw-r--r-- | src/components/FileUpload/FileUpload.tsx | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/components/AttachLink/AttachLink.tsx b/src/components/AttachLink/AttachLink.tsx index eb7aebd..e73f5c1 100644 --- a/src/components/AttachLink/AttachLink.tsx +++ b/src/components/AttachLink/AttachLink.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Button, } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; import LinkIcon from '@material-ui/icons/Link'; import Modal from './Modal'; @@ -30,9 +30,10 @@ const AttachLink: React.FC<PropTypes> = ({ callback, children }) => { return ( <> <Modal callback={callback} isOpen={isOpen} setIsOpen={setIsOpen} /> - {React.isValidElement(child) - ? React.cloneElement(child, { onClick: handleOpen }) - : defaultButton + { + React.isValidElement(child) + ? React.cloneElement(child, { onClick: handleOpen }) + : defaultButton } </> ); 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 } </> ); |