From 832da1e33689daa9beb06ec4655f75e981a5aadf Mon Sep 17 00:00:00 2001 From: Karolina Kosiorowska Date: Wed, 6 Dec 2023 09:52:03 +0100 Subject: [PATCH] Add types for chakra ui component styles --- dapp/src/theme/Button.ts | 3 ++- dapp/src/theme/Switch.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dapp/src/theme/Button.ts b/dapp/src/theme/Button.ts index 51a7cbf7a..0a3947861 100644 --- a/dapp/src/theme/Button.ts +++ b/dapp/src/theme/Button.ts @@ -1,7 +1,8 @@ import { mode } from "@chakra-ui/theme-tools" import type { StyleFunctionProps } from "@chakra-ui/styled-system" +import { ComponentSingleStyleConfig } from "@chakra-ui/react" -const Button = { +const Button: ComponentSingleStyleConfig = { baseStyle: { rounded: "none", }, diff --git a/dapp/src/theme/Switch.ts b/dapp/src/theme/Switch.ts index 1074491b4..1529dda02 100644 --- a/dapp/src/theme/Switch.ts +++ b/dapp/src/theme/Switch.ts @@ -1,4 +1,6 @@ -const Switch = { +import { ComponentSingleStyleConfig } from "@chakra-ui/react" + +const Switch: ComponentSingleStyleConfig = { baseStyle: { track: { _checked: {