From 42853ce3a698800d8ce15be9daa7bcb4692d78b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Palkovi=C4=8D?= Date: Thu, 7 Apr 2022 14:47:56 +0200 Subject: [PATCH 1/2] fix: Pseudo class potential unsafe warning --- lib/components/src/blocks/Source.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/src/blocks/Source.tsx b/lib/components/src/blocks/Source.tsx index 3aeadc49b295..287346cf6a48 100644 --- a/lib/components/src/blocks/Source.tsx +++ b/lib/components/src/blocks/Source.tsx @@ -1,5 +1,5 @@ import React, { ComponentProps, FunctionComponent } from 'react'; -import { styled, ThemeProvider, convert, themes } from '@storybook/theming'; +import { styled, ThemeProvider, convert, themes, ignoreSsrWarning } from '@storybook/theming'; import { EmptyBlock } from './EmptyBlock'; import { SyntaxHighlighter } from '../syntaxhighlighter/lazy-syntaxhighlighter'; @@ -52,7 +52,7 @@ const SourceSkeletonPlaceholder = styled.div<{}>(({ theme }) => ({ marginTop: 1, width: '60%', - '&:first-child': { + [`:first-child${ignoreSsrWarning}`]: { margin: 0, }, })); From b35d4098405a4a26674ddf59714f6cd2bbe55a56 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 7 Apr 2022 22:32:49 +0200 Subject: [PATCH 2/2] Add deleted & symbol --- lib/components/src/blocks/Source.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/src/blocks/Source.tsx b/lib/components/src/blocks/Source.tsx index 287346cf6a48..c71429c020e5 100644 --- a/lib/components/src/blocks/Source.tsx +++ b/lib/components/src/blocks/Source.tsx @@ -52,7 +52,7 @@ const SourceSkeletonPlaceholder = styled.div<{}>(({ theme }) => ({ marginTop: 1, width: '60%', - [`:first-child${ignoreSsrWarning}`]: { + [`&:first-child${ignoreSsrWarning}`]: { margin: 0, }, }));