mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
20 lines
No EOL
495 B
TypeScript
20 lines
No EOL
495 B
TypeScript
import React, { FC, ChangeEventHandler } from 'react';
|
|
import * as styles from './styles.scss';
|
|
import { Icon } from '~/components/input/Icon';
|
|
|
|
interface IProps {
|
|
onUpload?: ChangeEventHandler<HTMLInputElement>;
|
|
};
|
|
|
|
const ImageUploadButton: FC<IProps> = ({
|
|
onUpload,
|
|
}) => (
|
|
<div className={styles.wrap}>
|
|
<input type="file" onChange={onUpload} />
|
|
<div className={styles.icon}>
|
|
<Icon size={32} icon="plus" />
|
|
</div>
|
|
</div>
|
|
)
|
|
|
|
export { ImageUploadButton }; |