Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-hand sidebar for staking flow #132

Merged
merged 20 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
5 changes: 5 additions & 0 deletions dapp/src/assets/images/coins-stacked.svg
ioay marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dapp/src/assets/images/right-sidebar-bg.png
kkosiorowska marked this conversation as resolved.
Show resolved Hide resolved
nkuba marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dapp/src/assets/images/shield-plus.svg
ioay marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions dapp/src/components/GlobalStyles/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react"
import { Global } from "@emotion/react"

import SegmentRegular from "../../fonts/Segment-Regular.otf"
import SegmentMedium from "../../fonts/Segment-Medium.otf"
import SegmentSemiBold from "../../fonts/Segment-SemiBold.otf"
import SegmentBold from "../../fonts/Segment-Bold.otf"
import SegmentBlack from "../../fonts/Segment-Black.otf"
import SegmentRegular from "../../assets/fonts/Segment-Regular.otf"
import SegmentMedium from "../../assets/fonts/Segment-Medium.otf"
import SegmentSemiBold from "../../assets/fonts/Segment-SemiBold.otf"
import SegmentBold from "../../assets/fonts/Segment-Bold.otf"
import SegmentBlack from "../../assets/fonts/Segment-Black.otf"

r-czajkowski marked this conversation as resolved.
Show resolved Hide resolved
export default function GlobalStyles() {
return (
Expand Down
99 changes: 96 additions & 3 deletions dapp/src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
import React from "react"
import { Box, Button, useMultiStyleConfig } from "@chakra-ui/react"
import {
Box,
Button,
Icon,
useMultiStyleConfig,
Image,
Card,
CardBody,
CardHeader,
CardFooter,
HStack,
Link,
} from "@chakra-ui/react"
import RightSidebar from "../../assets/images/right-sidebar-bg.png"
import ShieldPlusIcon from "../../assets/images/shield-plus.svg"
import { useDocsDrawer, useSidebar } from "../../hooks"
import { ArrowUpRight } from "../../static/icons"
import { TextMd, TextSm } from "../shared/Typography"

const readMoreEarnings = "https://#"

const buttons = [
ioay marked this conversation as resolved.
Show resolved Hide resolved
{ label: "FAQ" },
{ label: "Token Contract" },
{ label: "Bridge Contract" },
]

export default function Sidebar() {
const { isOpen } = useSidebar()
Expand All @@ -15,8 +39,77 @@ export default function Sidebar() {
__css={styles.sidebarContainer}
>
<Box __css={styles.sidebar}>
{/* TODO: Add a correct content for the sidebar */}
<Button onClick={openDocsDrawer}>Open a documentation</Button>
<Button
justifyContent="flex-start"
leftIcon={<Icon as={ArrowUpRight} boxSize={6} />}
onClick={openDocsDrawer}
width="100%"
>
Docs
</Button>
<Card
marginTop="3"
bg="gold.100"
borderColor="white"
borderStyle="solid"
ioay marked this conversation as resolved.
Show resolved Hide resolved
>
<CardHeader padding="0">
<Image src={RightSidebar} alt="" width="70.5" height="40" />
</CardHeader>

<CardBody>
<TextMd alignSelf="stretch" fontWeight="bold">
Maximize your earnings by using tBTC to deposit and redeem BTC in
DeFi!
</TextMd>
</CardBody>

<CardFooter paddingTop="0">
<Link href={readMoreEarnings} isExternal>
<TextSm>Read more</TextSm>
</Link>
</CardFooter>
</Card>

<Card
marginTop="3"
bg="gold.100"
borderColor="white"
borderStyle="solid"
>
<CardHeader>
<TextMd fontWeight="bold">How we calculate fees</TextMd>
</CardHeader>

<CardBody paddingTop="0">
<HStack>
<Image
alignSelf="baseline"
position="relative"
top="0.5"
src={ShieldPlusIcon}
alt=""
/>
<TextSm>Fees is software empowered by the Threshold DAO.</TextSm>
</HStack>
</CardBody>
</Card>

{buttons.map(({ label }) => (
<Button
key={label}
marginTop="12px"
kkosiorowska marked this conversation as resolved.
Show resolved Hide resolved
variant="outline"
justifyContent="flex-start"
leftIcon={<Icon as={ArrowUpRight} boxSize={6} color="brand.400" />}
onClick={openDocsDrawer}
width="100%"
bg="gold.100"
border="#ffffff solid"
ioay marked this conversation as resolved.
Show resolved Hide resolved
>
{label}
</Button>
))}
</Box>
</Box>
)
Expand Down
1 change: 1 addition & 0 deletions dapp/src/theme/Sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const baseStyleSidebarContainer = defineStyle({
const baseStyleSidebar = defineStyle({
p: 4,
height: "100%",
w: "19.75rem",
kkosiorowska marked this conversation as resolved.
Show resolved Hide resolved
bg: "gold.200",
borderTop: "2px",
borderLeft: "2px",
Expand Down