From 067bedbeed69a0f09b1b6abe5af353972b837ee7 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 29 Sep 2021 17:34:41 +1000 Subject: [PATCH] Use grid to model maker's control panel Using a grid allows us to remove the hardcoded label width. --- frontend/src/MakerApp.tsx | 108 +++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 48 deletions(-) diff --git a/frontend/src/MakerApp.tsx b/frontend/src/MakerApp.tsx index 08132fe..d9c253a 100644 --- a/frontend/src/MakerApp.tsx +++ b/frontend/src/MakerApp.tsx @@ -3,6 +3,8 @@ import { Button, Container, Divider, + Grid, + GridItem, HStack, Tab, TabList, @@ -75,61 +77,71 @@ export default function App() { !runningStates.includes(value.state) && !closedStates.includes(value.state) && !openStates.includes(value.state) ); - const labelWidth = 110; - return ( - - - Min Quantity: - setMinQuantity(parse(valueString))} - value={format(minQuantity)} - /> - - - Min Quantity: - setMaxQuantity(parse(valueString))} - value={format(maxQuantity)} - /> - - - Order Price: - setOrderPrice(parse(valueString))} - value={format(orderPrice)} - /> - - - Leverage: - - - - - + + Current Price: + {49000} + + Min Quantity: + setMinQuantity(parse(valueString))} + value={format(minQuantity)} + /> + + Min Quantity: + setMaxQuantity(parse(valueString))} + value={format(maxQuantity)} + /> + + Order Price: + setOrderPrice(parse(valueString))} + value={format(orderPrice)} + /> + + Leverage: + + + + - - - + + + + + + + + + {order && }