1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed comment buttons mobile appearance

This commit is contained in:
Fedor Katurov 2021-03-09 15:19:40 +07:00
parent dd46a3f036
commit ebdb09a611
3 changed files with 63 additions and 31 deletions

View file

@ -65,16 +65,21 @@ const CommentForm: FC<IProps> = ({ comment, nodeId, onCancelEdit }) => {
<CommentFormAttaches /> <CommentFormAttaches />
<Group horizontal className={styles.buttons}> <div className={styles.buttons}>
<div className={styles.buttons_attach}>
<CommentFormAttachButtons onUpload={uploader.uploadFiles} /> <CommentFormAttachButtons onUpload={uploader.uploadFiles} />
</div>
<div className={styles.buttons_format}>
{!!textarea && ( {!!textarea && (
<CommentFormFormatButtons <CommentFormFormatButtons
element={textarea} element={textarea}
handler={formik.handleChange('text')} handler={formik.handleChange('text')}
/> />
)} )}
</div>
<div className={styles.buttons_submit}>
{isLoading && <LoaderCircle size={20} />} {isLoading && <LoaderCircle size={20} />}
{isEditing && ( {isEditing && (
@ -92,7 +97,8 @@ const CommentForm: FC<IProps> = ({ comment, nodeId, onCancelEdit }) => {
> >
{!isEditing ? 'Сказать' : 'Сохранить'} {!isEditing ? 'Сказать' : 'Сохранить'}
</Button> </Button>
</Group> </div>
</div>
</FileUploaderProvider> </FileUploaderProvider>
</FormikProvider> </FormikProvider>
</form> </form>

View file

@ -21,13 +21,42 @@
position: relative; position: relative;
z-index: 1; z-index: 1;
display: flex; display: grid;
flex-direction: row;
background: transparentize(black, 0.8); background: transparentize(black, 0.8);
padding: $gap / 2; padding: $gap / 2;
border-radius: 0 0 $radius $radius; border-radius: 0 0 $radius $radius;
flex-wrap: wrap; flex-wrap: wrap;
column-gap: $gap;
grid-template-columns: auto 1fr auto;
grid-template-rows: 1fr;
grid-template-areas: "attach format submit";
@media(max-width: 470px) {
padding: $gap;
grid-template-columns: 1fr auto;
grid-template-rows: 1fr 1fr;
grid-template-areas:
"attach format"
"submit submit";
row-gap: $gap;
}
&_attach {
grid-area: attach;
}
&_format {
grid-area: format;
}
&_submit {
grid-area: submit;
display: grid;
grid-auto-flow: column;
align-items: flex-end;
justify-content: flex-end;
column-gap: $gap / 2;
}
} }
.uploads { .uploads {

View file

@ -2,11 +2,8 @@
.wrap { .wrap {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: nowrap;
height: 32px; height: 32px;
flex: 1; flex: 1;
width: 100%;
@media(max-width: 480px) {
display: none;
}
} }