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:
parent
adfa668f15
commit
ec964ceea4
2 changed files with 15 additions and 0 deletions
|
@ -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>
|
||||
)
|
||||
|
||||
|
|
|
@ -25,3 +25,14 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue