-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7645f72
commit bf949e1
Showing
5 changed files
with
124 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
import { DynamicModalContext, useDynamicModal } from "@umami/components"; | ||
import { useDataPolling } from "@umami/data-polling"; | ||
|
||
import { Layout } from "./Layout"; | ||
|
||
export const App = () => { | ||
useDataPolling(); | ||
const dynamicModal = useDynamicModal(); | ||
|
||
return <Layout />; | ||
return ( | ||
<DynamicModalContext.Provider value={dynamicModal}> | ||
<Layout /> | ||
{dynamicModal.content} | ||
</DynamicModalContext.Provider> | ||
); | ||
}; |
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,54 +1,82 @@ | ||
import { Box, Button, Flex, IconButton, Text } from "@chakra-ui/react"; | ||
import { | ||
Box, | ||
Button, | ||
Flex, | ||
IconButton, | ||
ModalBody, | ||
ModalCloseButton, | ||
ModalContent, | ||
ModalHeader, | ||
Text, | ||
} from "@chakra-ui/react"; | ||
import { DynamicModalContext } from "@umami/components"; | ||
import { useContext } from "react"; | ||
|
||
import { ArrowDownLeftIcon, PlusIcon } from "../../assets/icons"; | ||
|
||
export const AccountBalance = () => ( | ||
<Box paddingX="12px"> | ||
<Flex flexDirection="column" gap="4px"> | ||
<Text | ||
display={{ | ||
base: "none", | ||
lg: "block", | ||
}} | ||
fontWeight="600" | ||
size="sm" | ||
> | ||
Tez Balance | ||
</Text> | ||
<Text size="2xl" variant="bold"> | ||
2882.675746 ꜩ | ||
</Text> | ||
<Text size="sm">$3603.34</Text> | ||
</Flex> | ||
<Flex | ||
alignItems="center" | ||
justifyContent="space-between" | ||
marginTop={{ base: "20px", lg: "40px" }} | ||
> | ||
<IconButton | ||
aria-label="Deposit" | ||
icon={<PlusIcon width="24px" height="24px" />} | ||
isRound | ||
size="lg" | ||
variant="iconButtonSolid" | ||
/> | ||
<IconButton | ||
marginRight="12px" | ||
marginLeft="auto" | ||
borderRadius="full" | ||
aria-label="Send" | ||
icon={<ArrowDownLeftIcon />} | ||
size="lg" | ||
variant="iconButtonOutline" | ||
/> | ||
<Button | ||
padding={{ base: "10px 24px", lg: "10px 40px" }} | ||
borderRadius="full" | ||
size="lg" | ||
variant="primary" | ||
export const AccountBalance = () => { | ||
const { openWith, isOpen } = useContext(DynamicModalContext); | ||
|
||
return ( | ||
<Box paddingX="12px"> | ||
<Flex flexDirection="column" gap="4px"> | ||
<Text | ||
display={{ | ||
base: "none", | ||
lg: "block", | ||
}} | ||
fontWeight="600" | ||
size="sm" | ||
> | ||
Tez Balance | ||
</Text> | ||
<Text size="2xl" variant="bold"> | ||
2882.675746 ꜩ | ||
</Text> | ||
<Text size="sm">$3603.34</Text> | ||
</Flex> | ||
<Flex | ||
alignItems="center" | ||
justifyContent="space-between" | ||
marginTop={{ base: "20px", lg: "40px" }} | ||
> | ||
Send | ||
</Button> | ||
</Flex> | ||
</Box> | ||
); | ||
<IconButton | ||
aria-label="Deposit" | ||
icon={<PlusIcon width="24px" height="24px" />} | ||
isRound | ||
size="lg" | ||
variant="iconButtonSolid" | ||
/> | ||
<IconButton | ||
marginRight="12px" | ||
marginLeft="auto" | ||
borderRadius="full" | ||
aria-label="Send" | ||
icon={<ArrowDownLeftIcon />} | ||
size="lg" | ||
variant="iconButtonOutline" | ||
/> | ||
<Button | ||
padding={{ base: "10px 24px", lg: "10px 40px" }} | ||
borderRadius="full" | ||
onClick={() => | ||
openWith( | ||
<ModalContent> | ||
<ModalHeader> | ||
<ModalCloseButton /> | ||
</ModalHeader> | ||
<ModalBody> | ||
<Text>Not supported yet :(</Text> | ||
</ModalBody> | ||
</ModalContent> | ||
) | ||
} | ||
size="lg" | ||
variant="primary" | ||
> | ||
Send {isOpen} | ||
</Button> | ||
</Flex> | ||
</Box> | ||
); | ||
}; |
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