Skip to content

Commit

Permalink
migrate-file-uploader-WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
likhith-deriv committed Nov 11, 2022
1 parent 710a540 commit 3981ae6
Showing 1 changed file with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,21 @@ const Uploader = ({ data, value, is_full, onChange, has_frame }) => {
handleChange(file, setFieldValue);
};

const ValidationErrorMessage = open => {
return (
<div className={`${ROOT_CLASS}__uploader-details`}>
{image.errors.map((error, index) => (
<Text key={index} as='p' size='xs' color='secondary' align='center'>
{error}
</Text>
))}
<Button
medium
secondary
text={isMobile() ? localize('Tap here to upload') : localize('Drop file or click here to upload')}
onClick={open}
/>
</div>
);
};
const ValidationErrorMessage = open => (
<div className={`${ROOT_CLASS}__uploader-details`}>
{image.errors.map((error, index) => (
<Text key={index} as='p' size='xs' color='secondary' align='center'>
{error}
</Text>
))}
<Button
medium
secondary
text={isMobile() ? localize('Tap here to upload') : localize('Drop file or click here to upload')}
onClick={open}
/>
</div>
);

return (
<Field name={data.name}>
Expand Down

0 comments on commit 3981ae6

Please sign in to comment.