diff --git a/README.md b/README.md index a09a425..4ab975b 100644 --- a/README.md +++ b/README.md @@ -58,24 +58,31 @@ const Link: LinkComponent = ({ const HelloWorldMacro = ({ config, + children, myCustomProp }: { config: Record myCustomProp: RestProps['myCustomProp'] }) => { return ( -

Hello, World!

+ <> +

Hello, World! < /h1> + { + children + } + ); } const Macro: MacroComponent = ({ config, descriptor, + children, ...rest }) => { if (descriptor === 'com.enonic.app.example:helloworld') { const props = {...rest, config}; - return ; + return {children} < /HelloWorldMacro>; } throw new Error(`Macro not found: ${descriptor}`); }