From 5ed9d38493e2f2ea05b060f1470b317001701ca5 Mon Sep 17 00:00:00 2001 From: Andrei Grigore Date: Mon, 9 May 2022 20:10:40 +0300 Subject: [PATCH] Expandable table mobile views --- .../templates/expandable/PopupRow.jsx | 68 ++++++++----------- .../templates/expandable/PopupTable.jsx | 2 +- .../templates/expandable/style.less | 25 +++++++ 3 files changed, 55 insertions(+), 40 deletions(-) diff --git a/src/components/manage/Blocks/SimpleDataTable/templates/expandable/PopupRow.jsx b/src/components/manage/Blocks/SimpleDataTable/templates/expandable/PopupRow.jsx index aeea270..af0d07d 100644 --- a/src/components/manage/Blocks/SimpleDataTable/templates/expandable/PopupRow.jsx +++ b/src/components/manage/Blocks/SimpleDataTable/templates/expandable/PopupRow.jsx @@ -199,7 +199,7 @@ const PopupRow = ({ > {popupSchema.title} -
+
{popupSchema.logo && ( )} - {popupSchema.email && popupSchema.url && ( -
- {popupSchema.email && ( -
-

- Email: -

- - {popupSchema.email} - -
- )} - {popupSchema.url && ( -
-

- Website: -

- - {popupSchema.url} - -
- )} -
- )} +
+ {popupSchema.email && ( + + )} + {popupSchema.url && ( +
+

+ Website: +

+ + {popupSchema.url} + +
+ )} +
{popupSchema.description && ( @@ -253,14 +249,8 @@ const PopupRow = ({ )} -
-
+
+
{rowData && ( )}
-
+
{rowData && ( { return (
- +
{tableColumns && diff --git a/src/components/manage/Blocks/SimpleDataTable/templates/expandable/style.less b/src/components/manage/Blocks/SimpleDataTable/templates/expandable/style.less index ede2a68..67fa8fe 100644 --- a/src/components/manage/Blocks/SimpleDataTable/templates/expandable/style.less +++ b/src/components/manage/Blocks/SimpleDataTable/templates/expandable/style.less @@ -139,6 +139,31 @@ font-size: 1.5rem !important; } +.popup-header-data { + display: flex; + + @media screen and (max-width: 800px) { + flex-direction: column; + } +} + +.popup-columns-container { + display: flex; + margin: 10px 0; + justify-content: space-between; + + @media screen and (max-width: 800px) { + flex-direction: column; + } +} + +.popup-column { + width: 49%; + @media screen and (max-width: 800px) { + width: 100%; + } +} + .popup-url { font-size: 24px; font-weight: bold;