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:
parent
dfaac877fb
commit
fa4d51360b
81 changed files with 741 additions and 972 deletions
src/components/editors/EditorUploadButton
21
src/components/editors/EditorUploadButton/index.tsx
Normal file
21
src/components/editors/EditorUploadButton/index.tsx
Normal 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 };
|
38
src/components/editors/EditorUploadButton/styles.scss
Normal file
38
src/components/editors/EditorUploadButton/styles.scss
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue