1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-05 09:36:41 +07:00

eslint fix

This commit is contained in:
muerwre 2019-08-09 12:23:07 +07:00
parent dfaac877fb
commit fa4d51360b
81 changed files with 741 additions and 972 deletions
src/components/editors/EditorUploadButton

View file

@ -0,0 +1,21 @@
import React, { FC, ChangeEventHandler } from 'react';
import * as styles from './styles.scss';
import { Icon } from '~/components/input/Icon';
interface IProps {
onUpload?: ChangeEventHandler<HTMLInputElement>;
}
const EditorUploadButton: FC<IProps> = ({
onUpload,
}) => (
<div className={styles.wrap}>
<input type="file" onChange={onUpload} accept="image/*" multiple />
<div className={styles.icon}>
<Icon size={32} icon="plus" />
</div>
</div>
);
export { EditorUploadButton };

View file

@ -0,0 +1,38 @@
.wrap {
width: 52px;
height: 52px;
border-radius: 32px !important;
position: relative;
border-radius: $radius;
cursor: pointer;
// opacity: 0.7;
transition: opacity 0.5s;
background: $red_gradient;
box-shadow: $content_bg 0 0 5px 10px;
&:hover {
opacity: 1;
}
input {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
opacity: 0;
z-index: 1;
cursor: pointer;
}
}
.icon {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
}