Skip to content

Commit

Permalink
Set the spacing between the button elements to match style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Dec 23, 2024
1 parent 2a62b08 commit a2a5238
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions dapp/src/theme/buttonTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineStyle, defineStyleConfig } from "@chakra-ui/react"

const baseStyle = defineStyle({
borderRadius: "sm",
gap: 1,
})

const loadingStyles = defineStyle({
Expand Down
7 changes: 7 additions & 0 deletions dapp/src/theme/utils/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ const bodyStyle = defineStyle((props: StyleFunctionProps) => ({
color: mode("text.primary", "text.primary")(props),
}))

// To set the correct spacing between button elements,
// we need to reset the margin for the icon
const buttonIconStyle = defineStyle({
margin: "0px !important",
})

const globalStyle = (props: StyleFunctionProps) => ({
body: bodyStyle(props),
".chakra-button__icon": buttonIconStyle,
})

export default {
Expand Down

0 comments on commit a2a5238

Please sign in to comment.