From 819e988a2e5f6aee32d6a09b90c3ba508f5f2760 Mon Sep 17 00:00:00 2001 From: muerwre Date: Fri, 2 Aug 2019 04:30:08 +0700 Subject: [PATCH] refined horizontal editor --- .../examples/HorizontalExample/index.tsx | 67 +++++-------------- .../examples/HorizontalExample/styles.scss | 61 ++++------------- src/styles/variables.scss | 2 +- 3 files changed, 29 insertions(+), 101 deletions(-) diff --git a/src/containers/examples/HorizontalExample/index.tsx b/src/containers/examples/HorizontalExample/index.tsx index b93a2f8f..c9e1477b 100644 --- a/src/containers/examples/HorizontalExample/index.tsx +++ b/src/containers/examples/HorizontalExample/index.tsx @@ -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 = () => ( - - +
+
- - - -
-
-
-
-
-
-
-
- - - +
-
- - -
- - + + + - - -
- -
- -
- - -
- - +
); export { HorizontalExample }; diff --git a/src/containers/examples/HorizontalExample/styles.scss b/src/containers/examples/HorizontalExample/styles.scss index f8aff32b..40173856 100644 --- a/src/containers/examples/HorizontalExample/styles.scss +++ b/src/containers/examples/HorizontalExample/styles.scss @@ -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 { } diff --git a/src/styles/variables.scss b/src/styles/variables.scss index a1906bb1..44ffe0cd 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -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() {