1*8a3afa28SCedric van Puttenimport React, { PropsWithChildren, useEffect } from 'react'; 2*8a3afa28SCedric van Putten 3*8a3afa28SCedric van Puttenimport { H3 } from '~/components/plugins/Headings'; 4*8a3afa28SCedric van Putten 5*8a3afa28SCedric van Puttentype Props = PropsWithChildren<object>; 6*8a3afa28SCedric van Putten 7*8a3afa28SCedric van Puttenexport const ConfigPluginExample = ({ children }: Props) => { 8*8a3afa28SCedric van Putten useEffect(() => { 9*8a3afa28SCedric van Putten if (typeof children === 'string') { 10*8a3afa28SCedric van Putten throw new Error( 11*8a3afa28SCedric van Putten `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*8a3afa28SCedric van Putten ); 13*8a3afa28SCedric van Putten } 14*8a3afa28SCedric van Putten }, [children]); 15*8a3afa28SCedric van Putten 16*8a3afa28SCedric van Putten return ( 17*8a3afa28SCedric van Putten <> 18*8a3afa28SCedric van Putten <H3>Example app.json with config plugin</H3> 19*8a3afa28SCedric van Putten {children} 20*8a3afa28SCedric van Putten </> 21*8a3afa28SCedric van Putten ); 22*8a3afa28SCedric van Putten}; 23