Skip to content

Commit

Permalink
Merge branch 'main' of github.com:thesis/acre into handling-modal-window
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Dec 11, 2023
2 parents 4be5fce + 69b5104 commit 9f2e4c1
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 34 deletions.
16 changes: 5 additions & 11 deletions dapp/src/components/Header/ConnectWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import React from "react"
import {
Button,
HStack,
Icon,
Text,
Tooltip,
useColorModeValue,
} from "@chakra-ui/react"
import { Button, HStack, Icon, Text, Tooltip } from "@chakra-ui/react"
import { Account } from "@ledgerhq/wallet-api-client"
import { Bitcoin, Ethereum, Info } from "../../static/icons"
import { BITCOIN } from "../../constants"
Expand All @@ -30,8 +23,9 @@ function ConnectButton({
account,
requestAccount,
}: ConnectButtonsProps) {
const styles = !account ? { color: "error", borderColor: "error" } : undefined
const colorRightIcon = useColorModeValue("black", "grey.80")
const styles = !account
? { color: "red.400", borderColor: "red.400" }
: undefined

return (
<Button
Expand All @@ -42,7 +36,7 @@ function ConnectButton({
!account ? (
// TODO: Add correct text for tooltip
<Tooltip label="Template">
<Icon as={rightIcon} color={colorRightIcon} />
<Icon as={rightIcon} color="grey.700" />
</Tooltip>
) : undefined
}
Expand Down
3 changes: 1 addition & 2 deletions dapp/src/components/Overview/PositionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Button,
Tooltip,
Icon,
useColorModeValue,
CardBody,
Card,
CardFooter,
Expand All @@ -27,7 +26,7 @@ export default function PositionDetails(props: CardProps) {
<Text>Your positions</Text>
{/* TODO: Add correct text for tooltip */}
<Tooltip label="Template">
<Icon as={Info} color={useColorModeValue("black", "grey.80")} />
<Icon as={Info} color="grey.700" />
</Tooltip>
</HStack>
<Text>
Expand Down
3 changes: 2 additions & 1 deletion dapp/src/components/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { useDocsDrawer } from "../../hooks"
export default function Overview() {
const { onOpen } = useDocsDrawer()

const bg = useColorModeValue("white", "grey.400")
// TODO: Create a custom theme for card component
const bg = useColorModeValue("gold.100", "gold.100")

return (
<Flex direction="column" gap={2} p={6}>
Expand Down
10 changes: 6 additions & 4 deletions dapp/src/theme/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ const Button: ComponentSingleStyleConfig = {
},
variants: {
solid: (props: StyleFunctionProps) => ({
backgroundColor: mode("black", "purple")(props),
// TODO: Update when the dark theme is ready
backgroundColor: mode("brand.400", "brand.400")(props),
color: "white",
}),
outline: (props: StyleFunctionProps) => ({
color: mode("black", "grey.80")(props),
borderColor: mode("black", "grey.50")(props),
// TODO: Update when the dark theme is ready
color: mode("grey.700", "grey.700")(props),
borderColor: mode("grey.700", "grey.700")(props),
}),
link: (props: StyleFunctionProps) => ({
color: mode("black", "grey.50")(props),
color: mode("grey.700", "grey.700")(props),
textDecoration: "underline",
}),
},
Expand Down
4 changes: 2 additions & 2 deletions dapp/src/theme/Switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const Switch: ComponentSingleStyleConfig = {
track: {
_checked: {
_dark: {
bg: "purple",
bg: "grey.700",
},
_light: {
bg: "grey.200",
bg: "grey.700",
},
},
},
Expand Down
5 changes: 3 additions & 2 deletions dapp/src/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ const defaultTheme = {
styles: {
global: (props: StyleFunctionProps) => ({
body: {
backgroundColor: mode("grey.100", "grey.300")(props),
color: mode("black", "grey.80")(props),
// TODO: Update when the dark theme is ready
backgroundColor: mode("gold.300", "gold.300")(props),
color: mode("grey.700", "grey.700")(props),
},
}),
},
Expand Down
64 changes: 52 additions & 12 deletions dapp/src/theme/utils/colors.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,56 @@
// TODO: Currently, the correct colors have not yet been defined.
// Let's update them later.
export const colors = {
white: "#FFF",
black: "#000",
purple: "#7D00FF",
error: "#F00",
brand: {
100: "#FFEDEB",
200: "#FFC5BF",
300: "#FF8B7B",
400: "#F34900", // Acre Orange
500: "#B53400",
600: "#7A2000",
700: "#450E00",
},
gold: {
100: "#FBF7EC",
200: "#F8EFDA",
300: "#F3E5C1", // Acre Dust
400: "#EDD8A2",
500: "#EACF88",
600: "#E2B950",
700: "#D69B04", // Acre Wheat
},
green: {
100: "#D6F2CE",
200: "#AFE7A1",
300: "#79CA52",
400: "#43AD02", // Acre Grass
500: "#318401",
600: "#205C01",
700: "#103800",
},
blue: {
100: "#EEF0FF",
200: "#CDD4FE",
300: "#9AAAFD",
400: "#5E80FC",
500: "#1059E6", // Acre Aqua
600: "#073B9E",
700: "#021F5C",
},
red: {
100: "#FDDADA",
200: "#FAA3A4",
300: "#F86165",
400: "#DA1E28",
500: "#9A1219",
600: "#5F070B",
700: "#2B0102",
},
grey: {
50: "rgba(255, 255, 255, 0.50)",
80: "rgba(255, 255, 255, 0.80)",
100: "#ECECEC",
200: "#37393C",
300: "#1D1E20",
400: "#1A1B1D",
100: "#F1F0F1",
200: "#D3D0D1",
300: "#AFA8A9",
400: "#8D8184",
500: "#675E60",
600: "#443D3F",
700: "#231F20", // Acre Dirt
},
}

0 comments on commit 9f2e4c1

Please sign in to comment.