From 18d4cdce0cb6f1f6860c12c2cc00a01bd8699752 Mon Sep 17 00:00:00 2001 From: Tom Neuber Date: Sun, 6 Apr 2025 10:21:00 +0200 Subject: [PATCH] chore(src/types): define "IThemeProps" interface as "DefaultTheme" object --- src/types/styled-components.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/types/styled-components.d.ts diff --git a/src/types/styled-components.d.ts b/src/types/styled-components.d.ts new file mode 100644 index 0000000..8d59f3f --- /dev/null +++ b/src/types/styled-components.d.ts @@ -0,0 +1,9 @@ +import "styled-components" +import { IThemeProps } from "../lib/useTheme" + +// As of styled-components v6.1.17, we need to map our custom theme interface to the +// default styled-components theme, as the type definition has been tightened with the merge request. +// https://github.com/styled-components/styled-components/pull/4317 +declare module "styled-components" { + export interface DefaultTheme extends IThemeProps {} +}