From cdea24f10e31dde5ecab29428315e6b1b4950804 Mon Sep 17 00:00:00 2001 From: Rifqy Zacky Ariadhy Date: Tue, 29 Jan 2019 19:37:48 +0700 Subject: [PATCH] update: responsive layout modal voucher --- src/common/pages/Vouchers/Modal/index.js | 331 ++++++++++++++------- src/common/pages/Vouchers/Modal/style.scss | 19 +- 2 files changed, 236 insertions(+), 114 deletions(-) diff --git a/src/common/pages/Vouchers/Modal/index.js b/src/common/pages/Vouchers/Modal/index.js index 36d4d56..030a163 100644 --- a/src/common/pages/Vouchers/Modal/index.js +++ b/src/common/pages/Vouchers/Modal/index.js @@ -8,6 +8,7 @@ import {LINKS} from "../../../routes"; import NumberFormat from 'react-number-format'; import get from 'lodash.get'; import ReactHtmlParser from "react-html-parser"; +import MediaQuery from 'react-responsive'; const Option = Select.Option; @@ -50,122 +51,228 @@ export default class ModalVouchersComponent extends React.Component { const additional_data = get(data, 'additional_data', {}) || {}; return ( - -
- -

{data.name}

-
-
-

{ReactHtmlParser(data.description)}

- - {(additional_data.information != null) && -

Information

-

{additional_data.information}

-
- } type="success" />} - - - -
-
-

Points

-

+
+ +

{data.name}

-
- ( - - )} /> +
+
{ReactHtmlParser(data.description)}
+ {(additional_data.information != null) && +

Information

+

{additional_data.information}

+
+ } type="success" />} + + + +
+
+

Points

+

+
+
+ ( + + )} /> +
+
-
-
-
+ + + + +
+
{ReactHtmlParser(data.description)}
+ {(additional_data.information != null) && +

Information

+

{additional_data.information}

+
+ } type="success" />} + + + +
+
+

Points

+

+
+
+ ( + + )} /> +
+
+ +
+
+ ) } } diff --git a/src/common/pages/Vouchers/Modal/style.scss b/src/common/pages/Vouchers/Modal/style.scss index 9a1374e..178460c 100644 --- a/src/common/pages/Vouchers/Modal/style.scss +++ b/src/common/pages/Vouchers/Modal/style.scss @@ -1,5 +1,13 @@ -.imageModal{ - width: 120px; +@media(min-width: 800px){ + .imageModal{ + width: 120px; + } +} + +@media(max-width: 800px){ + .imageModal{ + display: none; + } } .titleModal{ @@ -10,7 +18,14 @@ } .descriptionModal{ + max-height: 25vh; + overflow-y: auto; + //z-index: 99; +} +.additionalInformationModal{ + //z-index: 100; + //background-color: #fff; } .informationAlertModal{