From 3254843e5bd3263f9ccf2dea19275615d6e51401 Mon Sep 17 00:00:00 2001 From: Philipp Hugenroth Date: Fri, 15 Dec 2023 18:25:42 +0100 Subject: [PATCH] Section on extension inputs Signed-off-by: Philipp Hugenroth --- .../architecture/03-extensions.md | 96 ++++++++++++++++--- 1 file changed, 85 insertions(+), 11 deletions(-) diff --git a/docs/frontend-system/architecture/03-extensions.md b/docs/frontend-system/architecture/03-extensions.md index 5fca53f420..af87a89c05 100644 --- a/docs/frontend-system/architecture/03-extensions.md +++ b/docs/frontend-system/architecture/03-extensions.md @@ -145,11 +145,11 @@ By default all extension data is required, meaning that the extension factory mu const extension = createExtension({ // ... output: { - element: coreExtensionData.reactElement.option(), + element: coreExtensionData.reactElement.optional(), }, factory() { return { - element: Math.random() < 0.5 ?
Hello World
: undefined, + element: , }; }, }); @@ -157,23 +157,97 @@ const extension = createExtension({ ## Extension Inputs - +```tsx + // ... + factory({ inputs }) { + return { + element: ( + + ), + }; + }, +``` ## Extension Configuration