-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor for spacing between component
- Loading branch information
1 parent
457f9fa
commit 2dca2bf
Showing
5 changed files
with
49 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
import React from "react" | ||
import { Button, Flex, Icon, Switch } from "@chakra-ui/react" | ||
import { Flex } from "@chakra-ui/react" | ||
import ConnectWallet from "./ConnectWallet" | ||
import { ChevronRight } from "../../static/icons" | ||
import { USD } from "../../constants" | ||
|
||
export default function Header() { | ||
return ( | ||
<Flex gap={4} direction="column"> | ||
<Flex justifyContent="end"> | ||
<ConnectWallet /> | ||
</Flex> | ||
<Flex justifyContent="space-between"> | ||
{/* TODO: Handle click actions */} | ||
<Switch size="sm">Show values in {USD.symbol}</Switch> | ||
<Button variant="link" rightIcon={<Icon as={ChevronRight} />}> | ||
Read documentation | ||
</Button> | ||
</Flex> | ||
<Flex justifyContent="end" p={6}> | ||
<ConnectWallet /> | ||
</Flex> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,46 @@ | ||
import React from "react" | ||
import { Grid, GridItem, useColorModeValue } from "@chakra-ui/react" | ||
import { | ||
Button, | ||
Flex, | ||
Grid, | ||
GridItem, | ||
Icon, | ||
Switch, | ||
useColorModeValue, | ||
} from "@chakra-ui/react" | ||
import PositionDetails from "./PositionDetails" | ||
import Statistics from "./Statistics" | ||
import TransactionHistory from "./TransactionHistory" | ||
import { USD } from "../../constants" | ||
import { ChevronRight } from "../../static/icons" | ||
|
||
export default function Overview() { | ||
const bg = useColorModeValue("white", "grey.400") | ||
return ( | ||
<Grid | ||
h="80vh" | ||
templateRows="repeat(12, 1fr)" | ||
templateColumns="repeat(12, 1fr)" | ||
gap={4} | ||
> | ||
<GridItem colSpan={3} rowSpan={5} bg={bg}> | ||
<PositionDetails /> | ||
</GridItem> | ||
<GridItem colSpan={9} rowSpan={5} bg={bg}> | ||
<Statistics /> | ||
</GridItem> | ||
<GridItem colSpan={12} rowSpan={7} bg={bg}> | ||
<TransactionHistory /> | ||
</GridItem> | ||
</Grid> | ||
<Flex direction="column" gap={2} p={6}> | ||
<Flex justifyContent="space-between"> | ||
{/* TODO: Handle click actions */} | ||
<Switch size="sm">Show values in {USD.symbol}</Switch> | ||
<Button variant="link" rightIcon={<Icon as={ChevronRight} />}> | ||
Read documentation | ||
</Button> | ||
</Flex> | ||
<Grid | ||
h="80vh" | ||
templateRows="repeat(12, 1fr)" | ||
templateColumns="repeat(12, 1fr)" | ||
gap={4} | ||
> | ||
<GridItem colSpan={3} rowSpan={5} bg={bg}> | ||
<PositionDetails /> | ||
</GridItem> | ||
<GridItem colSpan={9} rowSpan={5} bg={bg}> | ||
<Statistics /> | ||
</GridItem> | ||
<GridItem colSpan={12} rowSpan={7} bg={bg}> | ||
<TransactionHistory /> | ||
</GridItem> | ||
</Grid> | ||
</Flex> | ||
) | ||
} |