From ea87b50a83387af3dd2c49037b5aa7014db440a3 Mon Sep 17 00:00:00 2001 From: muerwre Date: Sat, 27 Jul 2019 18:36:35 +0700 Subject: [PATCH] MenuButton --- src/components/node/MenuButton/index.tsx | 33 +++++++++++ src/components/node/MenuButton/styles.scss | 28 +++++++++ .../examples/ImageExample/index.tsx | 58 +++++-------------- .../examples/ImageExample/styles.scss | 27 --------- 4 files changed, 77 insertions(+), 69 deletions(-) create mode 100644 src/components/node/MenuButton/index.tsx create mode 100644 src/components/node/MenuButton/styles.scss diff --git a/src/components/node/MenuButton/index.tsx b/src/components/node/MenuButton/index.tsx new file mode 100644 index 00000000..c16f6c89 --- /dev/null +++ b/src/components/node/MenuButton/index.tsx @@ -0,0 +1,33 @@ +import React, {FC} from 'react'; +import * as styles from './styles.scss'; +import { Group } from "~/components/containers/Group"; +import { Filler } from "~/components/containers/Filler"; + +interface IProps { + title: string; + description?: string; + icon: string; +} + +const MenuButton: FC = ({ + title, + icon, + description, +}) => ( +
+ +
+ +
+ + +
{title}
+ { description &&
{description}
} +
+
+
+); + +export { MenuButton }; diff --git a/src/components/node/MenuButton/styles.scss b/src/components/node/MenuButton/styles.scss new file mode 100644 index 00000000..2c781d91 --- /dev/null +++ b/src/components/node/MenuButton/styles.scss @@ -0,0 +1,28 @@ + +.button { + fill: white; + height: 48px; + display: flex; + align-items: center; +} + +.icon { + flex: 0 0 38px; + align-items: center; + justify-content: center; + display: flex; +} + +.title { + font: $font_16_semibold; + text-transform: uppercase; + margin-bottom: 2px; + white-space: nowrap; + flex: 1; +} + +.description { + font: $font_12_regular; + color: transparentize(white, 0.6); + white-space: nowrap; +} diff --git a/src/containers/examples/ImageExample/index.tsx b/src/containers/examples/ImageExample/index.tsx index d7884953..2ab6b051 100644 --- a/src/containers/examples/ImageExample/index.tsx +++ b/src/containers/examples/ImageExample/index.tsx @@ -6,11 +6,9 @@ import { Padder } from "~/components/containers/Padder"; import range from 'ramda/es/range'; import { Comment } from "~/components/node/Comment"; import { NodePanel } from "~/components/node/NodePanel"; -import { Filler } from "~/components/containers/Filler"; -import { Tag } from "~/components/node/Tag"; -import { TagField } from "~/components/containers/TagField"; -import {NodeRelated} from "~/components/node/NodeRelated"; -import {Tags} from "~/components/node/Tags"; +import { NodeRelated } from "~/components/node/NodeRelated"; +import { Tags } from "~/components/node/Tags"; +import { MenuButton } from "~/components/node/MenuButton"; interface IProps {} @@ -19,10 +17,6 @@ const ImageExample: FC = () => (
- { - // http://37.192.131.144/full/attached/2017/11/f01fdaaea789915284757634baf7cd11.jpg - // http://37.192.131.144/full/photos/photo-20120702-99383.jpg - }
@@ -45,41 +39,21 @@ const ImageExample: FC = () => ( -
- -
- -
+ - -
На главной
-
-
-
+ -
- -
- -
- - -
Видно всем
-
-
-
- -
- -
- -
- - -
Редактировать
-
-
-
+
diff --git a/src/containers/examples/ImageExample/styles.scss b/src/containers/examples/ImageExample/styles.scss index 3245a833..5c5bcb08 100644 --- a/src/containers/examples/ImageExample/styles.scss +++ b/src/containers/examples/ImageExample/styles.scss @@ -45,30 +45,3 @@ //position: relative; //top: -64px } - -.button { - fill: white; - height: 48px; - display: flex; - align-items: center; -} - -.button_icon { - flex: 0 0 38px; - align-items: center; - justify-content: center; - display: flex; -} - -.button_title { - font: $font_16_semibold; - text-transform: uppercase; - margin-bottom: 2px; - white-space: nowrap; - flex: 1; -} - -.button_desc { - font: $font_12_regular; - color: transparentize(white, 0.7); -}