Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
fix droppable typo

Co-authored-by: Thomas Dax <thomas.dax@vivid-planet.com>
  • Loading branch information
NataliaVizintini and thomasdax98 authored Dec 28, 2023
1 parent fcfffed commit 0b374b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/admin/admin/src/form/FinalFormFileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { FormattedMessage } from "react-intl";

import { Delete, Select } from "../../../admin-icons/lib";

export type FinalFormFileUploadClassKey = "root" | "dropableArea" | "dropableAreaCaption" | "fileList" | "fileListItem" | "disabled" | "error";
export type FinalFormFileUploadClassKey = "root" | "droppableArea" | "droppableAreaCaption" | "fileList" | "fileListItem" | "disabled" | "error";

const styles = ({ palette }: Theme) => {
return createStyles<FinalFormFileUploadClassKey, FinalFormFileUploadProps>({
Expand All @@ -20,7 +20,7 @@ const styles = ({ palette }: Theme) => {
alignSelf: "stretch",
minWidth: "350px",
},
dropableArea: {
droppableArea: {
display: "flex",
height: "80px",
padding: "10px",
Expand All @@ -38,7 +38,7 @@ const styles = ({ palette }: Theme) => {
border: `1px dashed ${palette.error.main}`,
},
},
dropableAreaCaption: {
droppableAreaCaption: {
color: palette.text.secondary,
fontSize: "14px",
fontStyle: "normal",
Expand Down Expand Up @@ -69,7 +69,7 @@ const styles = ({ palette }: Theme) => {
});
};

export interface FinalFormFileUploadProps extends FieldRenderProps<HTMLInputElement> {
export interface FinalFormFileUploadProps extends FieldRenderProps<File[], HTMLInputElement> {
dropzoneVariant: "dropzoneOnly" | "buttonOnly" | "default";
caption: React.ReactNode;
multipleFiles: boolean;
Expand Down Expand Up @@ -134,8 +134,8 @@ const FinalFormFileUploadComponent: React.FunctionComponent<WithStyles<typeof st
<div {...getRootProps()} className={classes.root}>
<input {...getInputProps()} />
{dropzoneVariant !== "buttonOnly" && (
<div className={clsx(classes.dropableArea, disabled && classes.disabled, isDragReject && classes.error)}>
<div className={classes.dropableAreaCaption}>
<div className={clsx(classes.droppableArea, disabled && classes.disabled, isDragReject && classes.error)}>
<div className={classes.droppableAreaCaption}>
<FormattedMessage id="comet.finalformfileupload.dropfiles" defaultMessage="Drop files here to upload" />
</div>
</div>
Expand Down

0 comments on commit 0b374b4

Please sign in to comment.