Skip to content

Commit

Permalink
fix: only allow image uploads in select context, update upload button…
Browse files Browse the repository at this point in the history
… label
  • Loading branch information
robinpyon committed Feb 22, 2021
1 parent 8dcca3f commit 9313a00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Header: FC<Props> = (props: Props) => {
icon={UploadIcon}
mode="bleed"
onClick={open}
text="Upload assets"
text={`Upload ${currentDocument ? 'images' : 'assets'}`}
tone="primary"
/>

Expand Down
1 change: 1 addition & 0 deletions src/components/UploadDropzone/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const UploadDropzone: FC<Props> = (props: Props) => {
}

const {getRootProps, getInputProps, isDragActive, open} = useDropzone({
accept: onSelect ? 'image/*' : '',
getFilesFromEvent: handleFileGetter,
noClick: true,
// Disable drag and drop functionality when in a selecting context
Expand Down

0 comments on commit 9313a00

Please sign in to comment.