mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
refactored upload component
This commit is contained in:
parent
3fdf14d680
commit
1f9c6ac8f7
5 changed files with 151 additions and 147 deletions
|
@ -1,4 +1,4 @@
|
|||
import React, { FC, ChangeEventHandler } from 'react';
|
||||
import React, { FC } from 'react';
|
||||
import * as styles from './styles.scss';
|
||||
import { INode } from '~/redux/types';
|
||||
import { EditorUploadButton } from '~/components/editors/EditorUploadButton';
|
||||
|
@ -6,12 +6,13 @@ import { EditorUploadButton } from '~/components/editors/EditorUploadButton';
|
|||
interface IProps {
|
||||
data: INode;
|
||||
setData: (val: INode) => void;
|
||||
onUpload: ChangeEventHandler<HTMLInputElement>;
|
||||
temp: string[];
|
||||
setTemp: (val: string[]) => void;
|
||||
}
|
||||
|
||||
const EditorPanel: FC<IProps> = ({ onUpload }) => (
|
||||
const EditorPanel: FC<IProps> = ({ data, setData, temp, setTemp }) => (
|
||||
<div className={styles.panel}>
|
||||
<EditorUploadButton onUpload={onUpload} />
|
||||
<EditorUploadButton data={data} setData={setData} temp={temp} setTemp={setTemp} />
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue