From 75571ee7c5de9de08f263350085472adec6d3c30 Mon Sep 17 00:00:00 2001 From: Thomas Neil James Shadwell Date: Mon, 23 May 2022 15:17:54 +0900 Subject: [PATCH] More explicit react children (#234) * More explicit react children * Update formatting --- ts/react/article/blurb/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ts/react/article/blurb/index.tsx b/ts/react/article/blurb/index.tsx index 1fcb1bebf0..b6025f7825 100644 --- a/ts/react/article/blurb/index.tsx +++ b/ts/react/article/blurb/index.tsx @@ -24,9 +24,13 @@ export const Article: React.FC = ({ short, children }) => { ); }; -export const Blurb: React.FC = ({ children }) => <>{children}; +export const Blurb: React.FC<{ children?: React.ReactNode }> = ({ + children, +}) => <>{children}; -export const Main: React.FC = ({ children }) => { +export const Main: React.FC<{ children?: React.ReactNode }> = ({ + children, +}) => { // don't render if in short mode if (React.useContext(RenderModeContext) == RenderMode.Short) return null;