1import React, { PropsWithChildren, useEffect } from 'react';
2
3import { H3 } from '~/ui/components/Text';
4
5type Props = PropsWithChildren<object>;
6
7export const ConfigPluginExample = ({ children }: Props) => {
8  useEffect(() => {
9    if (typeof children === 'string') {
10      throw new Error(
11        `Content inside 'ConfigPluginExample' needs to be surrounded by new lines to be parsed as markdown.\n\nMake sure there is a blank new line before and after this content: '${children}'`
12      );
13    }
14  }, [children]);
15
16  return (
17    <>
18      <H3>Example app.json with config plugin</H3>
19      {children}
20    </>
21  );
22};
23