1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

refined horizontal editor

This commit is contained in:
muerwre 2019-08-02 04:30:08 +07:00
parent 4c20da6151
commit 819e988a2e
3 changed files with 29 additions and 101 deletions

View file

@ -1,66 +1,29 @@
import React, { FC } from "react";
import { Card } from "~/components/containers/Card";
import * as styles from "./styles.scss";
import { Group } from "~/components/containers/Group";
import { Padder } from "~/components/containers/Padder";
import { CellGrid } from "~/components/containers/CellGrid";
import { Panel } from "~/components/containers/Panel";
import classNames = require("classnames");
import { Scroll } from "~/components/containers/Scroll";
import { Tags } from "~/components/node/Tags";
import { Button } from "~/components/input/Button";
import { InputText } from "~/components/input/InputText";
import { Grid } from "~/components/containers/Grid";
import {Padder} from "~/components/containers/Padder";
import {Group} from "~/components/containers/Group";
import {InputText} from "~/components/input/InputText";
import {Button} from "~/components/input/Button";
interface IProps {}
const HorizontalExample: FC<IProps> = () => (
<Card className={styles.wrap} seamless>
<Group className={styles.group} seamless>
<div className={styles.wrap}>
<Card seamless className={styles.card}>
<div className={styles.editor}>
<Scroll>
<Padder>
<CellGrid className={styles.editor_image_container} size={200}>
<div className={styles.editor_image} />
<div className={styles.editor_image} />
<div className={styles.editor_image} />
<div className={styles.editor_image} />
<div className={styles.editor_image} />
<div className={styles.editor_image} />
<div className={styles.editor_image} />
<div className={styles.editor_image} />
</CellGrid>
</Padder>
</Scroll>
</div>
<div className={styles.panel}>
<Padder>
<Grid columns="2fr 1fr 1fr">
<div>
<Group>
<InputText title="Название" />
<Padder className={styles.panel}>
<Group horizontal>
<InputText title="Название" />
<Tags
tags={[
{ title: "Избранный", feature: "red" },
{ title: "Плейлист", feature: "green" },
{ title: "Просто" },
{ title: "+ фото", feature: "black" },
{ title: "+ с музыкой", feature: "black" }
]}
/>
</Group>
</div>
<div />
<div />
</Grid>
</Padder>
</div>
</Group>
</Card>
<Button title="Сохранить" iconRight="play" />
</Group>
</Padder>
</Card>
</div>
);
export { HorizontalExample };

View file

@ -1,65 +1,30 @@
.wrap {
align-items: stretch;
flex: 1;
align-items: center;
justify-content: center;
display: flex;
background: $editor_bg;
flex: 1;
flex-direction: column;
}
.group {
display: flex;
align-items: stretch !important;
justify-content: stretch;
//flex: 1;
}
.panel {
background: $editor_panel_bg;
//flex: 1;
border-radius: $radius;
box-sizing: border-box;
.card {
padding: 0;
display: flex;
flex-direction: column;
justify-content: center;
}
.editor {
flex: 1;
min-height: 200px;
min-width: 50vw;
background: darken($content_bg, 4%);
border-radius: $radius;
display: flex;
align-items: stretch;
justify-content: stretch;
flex-direction: column;
}
.editor_panel {
}
.editor_image_panel {
// flex: 1;
}
.editor_image_container {
flex: 1;
@include outer_shadow();
}
.editor_image {
background: transparentize(white, 0.95);
padding-bottom: 100%;
border-radius: $radius;
}
.feature_card {
height: 100px;
background: darken($main_bg_color, 3%);
}
.panel_main {
flex: 1;
display: flex;
}
.close_icon {
height: 24px;
width: 24px;
background: transparentize(white, 0.95);
flex: 0 0 24px;
border-radius: $radius;
.panel {
}

View file

@ -64,7 +64,7 @@ $input_shadow_filled: $input_shadow;
@mixin outer_shadow() {
box-shadow: inset transparentize(white, 0.95) 0 1px,
inset transparentize(black, 0.5) 0 -1px;
transparentize(black, 0.8) 0 3px;
}
@mixin inner_shadow() {