Skip to content

Commit

Permalink
Update readme for 5.0 release #51
Browse files Browse the repository at this point in the history
  • Loading branch information
pmi committed Oct 8, 2024
1 parent ae1467d commit 85c5c48
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,31 @@ const Link: LinkComponent = ({

const HelloWorldMacro = ({
config,
children,
myCustomProp
}: {
config: Record<string,any>
myCustomProp: RestProps['myCustomProp']
}) => {
return (
<h1>Hello, World!</h1>
<>
<h1>Hello, World! < /h1>
{
children
}
</>
);
}

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

0 comments on commit 85c5c48

Please sign in to comment.