Skip to content

Commit

Permalink
Create constants for border styles in table theme
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Jan 12, 2024
1 parent 25214ea commit 98d383f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions dapp/src/theme/Table.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { tableAnatomy as parts } from "@chakra-ui/anatomy"
import { createMultiStyleConfigHelpers, defineStyle } from "@chakra-ui/react"

const BORDER_RADIUS_SIZE = "md"
const BORDER_STYLE = "1px solid white"

const KEYS = [...parts.keys, "cellContainer", "cell", "divider"] as const

const { defineMultiStyleConfig, definePartsStyle } =
Expand All @@ -14,19 +17,19 @@ const variantDoubleRowTable = defineStyle({
const variantDoubleRowTd = defineStyle({
p: 0,
bg: "gold.100",
borderTop: "1px solid white",
borderBottom: "1px solid white",
borderTop: BORDER_STYLE,
borderBottom: BORDER_STYLE,

_last: {
borderTopEndRadius: "md",
borderBottomEndRadius: "md",
borderRight: "1px solid white",
borderTopEndRadius: BORDER_RADIUS_SIZE,
borderBottomEndRadius: BORDER_RADIUS_SIZE,
borderRight: BORDER_STYLE,
},

_first: {
borderTopStartRadius: "md",
borderBottomStartRadius: "md",
borderLeft: "1px solid white",
borderTopStartRadius: BORDER_RADIUS_SIZE,
borderBottomStartRadius: BORDER_RADIUS_SIZE,
borderLeft: BORDER_STYLE

Check failure on line 32 in dapp/src/theme/Table.ts

View workflow job for this annotation

GitHub Actions / dapp-format

Insert `,`
},
})

Expand Down

0 comments on commit 98d383f

Please sign in to comment.