diff --git a/dapp/src/components/Typography/index.tsx b/dapp/src/components/Typography/index.tsx new file mode 100644 index 000000000..6e1231239 --- /dev/null +++ b/dapp/src/components/Typography/index.tsx @@ -0,0 +1,33 @@ +/* eslint-disable react/jsx-props-no-spreading */ +import React from "react" +import { Text, TextProps } from "@chakra-ui/react" + +export function TextXl(props: TextProps) { + return ( + + ) +} + +export function TextLg(props: TextProps) { + return ( + + ) +} + +export function TextMd(props: TextProps) { + return ( + + ) +} + +export function TextSm(props: TextProps) { + return ( + + ) +} + +export function TextXs(props: TextProps) { + return ( + + ) +} diff --git a/dapp/src/theme/index.ts b/dapp/src/theme/index.ts index 1445d60d4..de73c60c8 100644 --- a/dapp/src/theme/index.ts +++ b/dapp/src/theme/index.ts @@ -2,7 +2,7 @@ import { StyleFunctionProps, Tooltip, extendTheme } from "@chakra-ui/react" import { mode } from "@chakra-ui/theme-tools" import Button from "./Button" import Switch from "./Switch" -import { colors } from "./utils" +import { colors, fontSizes, fontWeights, lineHeights } from "./utils" // Currently, there is no possibility to set all tooltips with hasArrow by defaultProps. // Let's override the defaultProps as follows. @@ -10,6 +10,9 @@ Tooltip.defaultProps = { ...Tooltip.defaultProps, hasArrow: true } const defaultTheme = { colors, + fontSizes, + fontWeights, + lineHeights, styles: { global: (props: StyleFunctionProps) => ({ body: { diff --git a/dapp/src/theme/utils/fonts.ts b/dapp/src/theme/utils/fonts.ts new file mode 100644 index 000000000..18a482760 --- /dev/null +++ b/dapp/src/theme/utils/fonts.ts @@ -0,0 +1,22 @@ +export const fontSizes = { + xs: "0.75rem", + sm: "0.875rem", + md: "1rem", + lg: "1.125rem", + xl: "1.25rem", +} + +export const fontWeights = { + medium: 500, + semibold: 600, + bold: 700, + black: 900, +} + +export const lineHeights = { + xs: "1.125rem", + sm: "1.25rem", + md: "1.5rem", + lg: "1.75rem", + xl: "1.875rem", +} diff --git a/dapp/src/theme/utils/index.ts b/dapp/src/theme/utils/index.ts index c0b5e2654..9f377b3e3 100644 --- a/dapp/src/theme/utils/index.ts +++ b/dapp/src/theme/utils/index.ts @@ -1 +1,2 @@ export * from "./colors" +export * from "./fonts"