From 78940252137ecf51feeab91b5ec37735dced991e Mon Sep 17 00:00:00 2001 From: theborakompanioni Date: Fri, 4 Nov 2022 17:46:02 +0100 Subject: [PATCH] ui(orderbook): improve mobile view --- src/components/Orderbook.module.css | 19 ++++++++++--------- src/components/Orderbook.tsx | 11 +++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/components/Orderbook.module.css b/src/components/Orderbook.module.css index 551829aad..c56fb9790 100644 --- a/src/components/Orderbook.module.css +++ b/src/components/Orderbook.module.css @@ -6,38 +6,39 @@ .overlayContainer .orderbookContainer { display: flex; flex-direction: column; - gap: 2.5rem; + gap: 0.5rem; background-color: var(--bs-body-bg); } -@media only screen and (min-width: 768px) { +@media only screen and (min-width: 992px) { .overlayContainer .orderbookContainer { + gap: 1.5rem; padding: 2rem; border-radius: 0.5rem; } } -.overlayContainer .orderbookContainer > .titleBar { +.overlayContainer .orderbookContainer .titleBar { min-height: 3.6rem; display: flex; justify-content: space-between; flex-direction: column; align-items: flex-start; gap: 0.5rem; - padding: 0 0 0.8rem 0; + padding: 0 0.5rem 0.8rem 0.5rem; background-color: var(--bs-gray-100); } -@media only screen and (min-width: 768px) { - .overlayContainer .orderbookContainer > .titleBar { - align-items: center; +@media only screen and (min-width: 992px) { + .overlayContainer .orderbookContainer .titleBar { padding: 0.8rem 1rem; border-radius: 0.6rem; } } @media only screen and (min-width: 768px) { - .overlayContainer .orderbookContainer > .titleBar { + .overlayContainer .orderbookContainer .titleBar { + align-items: center; flex-direction: row; } } @@ -46,7 +47,7 @@ background-color: var(--bs-gray-800); } -.overlayContainer .orderbookContainer > .titleBar .refreshButton { +.overlayContainer .orderbookContainer .titleBar .refreshButton { display: flex; justify-content: center; align-items: center; diff --git a/src/components/Orderbook.tsx b/src/components/Orderbook.tsx index 406978c79..64a038da0 100644 --- a/src/components/Orderbook.tsx +++ b/src/components/Orderbook.tsx @@ -9,7 +9,6 @@ import { TFunction } from 'i18next' import { useTranslation } from 'react-i18next' import { Helper as ApiHelper } from '../libs/JmWalletApi' import * as ObwatchApi from '../libs/JmObwatchApi' -// @ts-ignore import { useSettings } from '../context/SettingsContext' import Balance from './Balance' import Sprite from './Sprite' @@ -233,7 +232,7 @@ const OrderbookTable = ({ data }: OrderbookTableProps) => { )} -
+
@@ -357,7 +356,7 @@ export function Orderbook({ orders, refresh, nickname }: OrderbookProps) { ) : ( <> {nickname && ( -
+
- +
{t('orderbook.title')} @@ -454,7 +453,7 @@ export function OrderbookOverlay({ nickname, show, onHide }: OrderbookOverlayPro - + {!isInitialized && isLoading ? ( Array(5) .fill('') @@ -470,7 +469,7 @@ export function OrderbookOverlay({ nickname, show, onHide }: OrderbookOverlayPro {alert && {alert.message}} {orders && ( - +