1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-01 15:46:40 +07:00

drop cell

This commit is contained in:
muerwre 2019-08-08 18:19:07 +07:00
parent 5bf67309c3
commit 84f73c9cf3
4 changed files with 52 additions and 5 deletions
src/components/editors/ImageUploadButton

View file

@ -0,0 +1,16 @@
import React, { FC, ChangeEventHandler } from 'react';
import * as styles from './styles.scss';
interface IProps {
onUpload?: ChangeEventHandler<HTMLInputElement>;
};
const ImageUploadButton: FC<IProps> = ({
onUpload,
}) => (
<div className={styles.wrap}>
<input type="file" onChange={onUpload} />
</div>
)
export { ImageUploadButton };

View file

@ -0,0 +1,22 @@
.wrap {
padding-bottom: 100%;
box-shadow: inset lighten($content_bg, 20%) 0 0 0 4px;
position: relative;
border-radius: $radius;
cursor: pointer;
opacity: 0.5;
transition: opacity 0.5s;
&:hover {}
input {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
opacity: 0;
z-index: 1;
cursor: pointer;
}
}