Skip to content

Commit abcfdf9

Browse files
authored
Merge pull request #8 from compolabs/fix/new-layout-fixes
Fixes for new layout
2 parents 2aa6f62 + dcff91e commit abcfdf9

File tree

5 files changed

+32
-7
lines changed

5 files changed

+32
-7
lines changed

src/screens/TradeScreen/BottomTables/BaseTable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const Root = styled(SmartFlex)<{ size: TRADE_TABLE_SIZE }>`
119119
transition: height 200ms;
120120
121121
${media.mobile} {
122-
height: fit-content;
122+
height: 100%;
123123
}
124124
`;
125125

Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
import React from "react";
2+
import styled from "@emotion/styled";
23
import { observer } from "mobx-react";
34

45
import { useStores } from "@src/stores";
6+
import { media } from "@src/themes/breakpoints";
57

68
import PerpTable from "./PerpTable";
79
import SpotTable from "./SpotTable";
810

911
const BottomTables: React.FC = observer(() => {
1012
const { tradeStore } = useStores();
1113

12-
if (tradeStore.isPerp) {
13-
return <PerpTable />;
14-
}
14+
const TableComponent = tradeStore.isPerp ? PerpTable : SpotTable;
1515

16-
return <SpotTable />;
16+
return (
17+
<StyledBottomTables>
18+
<TableComponent />
19+
</StyledBottomTables>
20+
);
1721
});
1822

1923
export default BottomTables;
24+
25+
const StyledBottomTables = styled.div`
26+
width: 100%;
27+
28+
${media.mobile} {
29+
flex-grow: 1;
30+
}
31+
`;

src/screens/TradeScreen/OrderbookAndTradesInterface/SpotOrderBook/SpotOrderBookImpl.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ const SettingsContainer = styled(Row)`
258258
259259
${media.mobile} {
260260
order: 3;
261+
padding: 0 8px;
262+
flex-direction: row-reverse;
261263
}
262264
`;
263265

@@ -347,6 +349,9 @@ const OrderbookContainer = styled.div`
347349
flex-direction: column;
348350
width: 100%;
349351
height: 100%;
352+
${media.mobile} {
353+
height: fit-content;
354+
}
350355
`;
351356

352357
const Container = styled(OrderbookContainer)<{
@@ -359,7 +364,7 @@ const Container = styled(OrderbookContainer)<{
359364
height: 100%;
360365
361366
${media.mobile} {
362-
justify-content: center;
367+
justify-content: flex-start;
363368
}
364369
`;
365370

src/screens/TradeScreen/RightBlock/CreateOrder/CreateOrder.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ const Root = styled(SmartFlex)`
345345
min-height: 418px;
346346
display: flex;
347347
gap: 16px;
348+
349+
${media.mobile} {
350+
min-height: fit-content;
351+
}
348352
`;
349353

350354
const LeverageButton = styled(Button)`
@@ -365,6 +369,10 @@ const TpSlContentContainer = styled(SmartFlex)<{ isOpen: boolean }>`
365369

366370
const CreateOrderButton = styled(Button)`
367371
margin: auto 0 0;
372+
373+
${media.mobile} {
374+
margin: 0;
375+
}
368376
`;
369377

370378
const ParamsContainer = styled.div`

src/screens/TradeScreen/TradeScreenMobile.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const MobileContent = styled.div`
9090
grid-template-columns: 140px 1fr;
9191
gap: 8px;
9292
width: 100%;
93-
min-height: 404px;
93+
height: fit-content;
9494
`;
9595

9696
const ContentWrapper = styled(SmartFlex)`

0 commit comments

Comments
 (0)