From 86a051fce064820e1eb50814a67007efc945b9de Mon Sep 17 00:00:00 2001 From: Santush Deb Nath Date: Sun, 21 Jul 2024 13:44:43 +0100 Subject: [PATCH] Update index.tsx --- example/basic/index.tsx | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/example/basic/index.tsx b/example/basic/index.tsx index 6b4aaf9..a9d7282 100644 --- a/example/basic/index.tsx +++ b/example/basic/index.tsx @@ -291,9 +291,9 @@ const BasicExample = () => { } var data = displayConditions.reduce((acc, condition) => { - acc[condition.key] = - condition.key === conditionKey || - condition.key === conditionKey.toLowerCase(); + acc[condition.key] = conditionKey && + (condition.key === conditionKey || + condition.key === conditionKey.toLowerCase()) return acc; }, {}); @@ -301,6 +301,25 @@ const BasicExample = () => { }); mailui?.setDisplayConditions(displayConditions) + + // mailui?.registerCustomTool({ + // initialProperties: {}, + // settings: { + // label: "Custom Tool", + // icon:
I
, + // }, + // dragPreview: null, + // toolbarComponent: () => { + // return

Hello how are you

+ // }, + // elementComponent: () => { + // return

Hello how are you

+ // }, + // previewElementComponent: () => { + // return

Hello how are you

+ // }, + // styleHelpers: null + // }) }; const onReady: MailUiEditorProps['onReady'] = (mailui) => { @@ -456,7 +475,8 @@ const BasicExample = () => { ], }, ], - protectedModules: [] + protectedModules: [], + customTools: [] }} />