1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

upload button plus

This commit is contained in:
muerwre 2019-08-08 18:43:19 +07:00
parent adfa668f15
commit ec964ceea4
2 changed files with 15 additions and 0 deletions

View file

@ -1,5 +1,6 @@
import React, { FC, ChangeEventHandler } from 'react';
import * as styles from './styles.scss';
import { Icon } from '~/components/input/Icon';
interface IProps {
onUpload?: ChangeEventHandler<HTMLInputElement>;
@ -10,6 +11,9 @@ const ImageUploadButton: FC<IProps> = ({
}) => (
<div className={styles.wrap}>
<input type="file" onChange={onUpload} />
<div className={styles.icon}>
<Icon size={32} icon="plus" />
</div>
</div>
)

View file

@ -24,4 +24,15 @@
z-index: 1;
cursor: pointer;
}
}
.icon {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
}