Skip to content

Commit

Permalink
Added chakraSpacingUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
ioay committed Mar 13, 2024
1 parent 401f253 commit f1218a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dapp/src/theme/utils/units.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
// The values are proportional, so 1 spacing unit is equal to 0.25rem, which translates to 4px by default in common browsers.
export const chakraUnitToPx = (chakraUnit: number): number => chakraUnit * 4
const chakraSpacingUnit = {
px: 4,
rem: 0.25,
}
export const chakraUnitToPx = (chakraUnit: number): number =>
chakraUnit * chakraSpacingUnit.px

0 comments on commit f1218a7

Please sign in to comment.