1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed file dropping and panel buttons

This commit is contained in:
Fedor Katurov 2019-10-21 13:27:28 +07:00
parent 554a2ccfa7
commit 2ca9e9bdef
6 changed files with 41 additions and 14 deletions

View file

@ -27,6 +27,9 @@ type IProps = ReturnType<typeof mapStateToProps> &
setData: (val: INode) => void;
temp: string[];
setTemp: (val: string[]) => void;
accept?: string;
icon?: string;
};
const EditorUploadButtonUnconnected: FC<IProps> = ({
@ -37,6 +40,8 @@ const EditorUploadButtonUnconnected: FC<IProps> = ({
statuses,
files,
uploadUploadFiles,
accept = 'image/*',
icon = 'plus',
}) => {
const eventPreventer = useCallback(event => event.preventDefault(), []);
@ -116,10 +121,10 @@ const EditorUploadButtonUnconnected: FC<IProps> = ({
return (
<div className={styles.wrap}>
<input type="file" onChange={onInputChange} accept="image/*" multiple />
<input type="file" onChange={onInputChange} accept={accept} multiple />
<div className={styles.icon}>
<Icon size={32} icon="plus" />
<Icon size={32} icon={icon} />
</div>
</div>
);