From 380983e6750222f773e3469a4813c1f59ffdf0a5 Mon Sep 17 00:00:00 2001 From: Beatrice Guerra Date: Wed, 24 Aug 2022 14:34:22 +0200 Subject: [PATCH] docs: fix json cycle on default theme printer refs: (#114) --- docs/components/ThemePrinter.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/components/ThemePrinter.tsx b/docs/components/ThemePrinter.tsx index e5385c1d..85581683 100644 --- a/docs/components/ThemePrinter.tsx +++ b/docs/components/ThemePrinter.tsx @@ -4,7 +4,8 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import React, { useContext } from 'react'; -import styled, { DefaultTheme } from 'styled-components'; +import styled from 'styled-components'; +import { ThemeObj } from '../../src/theme/theme'; import { ThemeContext } from '../../src/theme/theme-context-provider'; const Pre = styled.pre` @@ -12,7 +13,7 @@ const Pre = styled.pre` `; export default function ThemePrinter(): JSX.Element { - const theme = useContext(ThemeContext); + const { windowObj, ...theme } = useContext(ThemeContext); return
{JSON.stringify(theme, null, 2)}
; }