Skip to content

Commit

Permalink
More explicit react children (#234)
Browse files Browse the repository at this point in the history
* More explicit react children

* Update formatting
  • Loading branch information
Zemnmez committed May 23, 2022
1 parent 40a82ca commit 75571ee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ts/react/article/blurb/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ export const Article: React.FC<ArticleProps> = ({ 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;

Expand Down

0 comments on commit 75571ee

Please sign in to comment.