Skip to content

Commit 86a051f

Browse files
committed
Update index.tsx
1 parent 372c82b commit 86a051f

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

example/basic/index.tsx

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,35 @@ const BasicExample = () => {
291291
}
292292

293293
var data = displayConditions.reduce((acc, condition) => {
294-
acc[condition.key] =
295-
condition.key === conditionKey ||
296-
condition.key === conditionKey.toLowerCase();
294+
acc[condition.key] = conditionKey &&
295+
(condition.key === conditionKey ||
296+
condition.key === conditionKey.toLowerCase())
297297
return acc;
298298
}, {});
299299

300300
done(data)
301301
});
302302

303303
mailui?.setDisplayConditions(displayConditions)
304+
305+
// mailui?.registerCustomTool({
306+
// initialProperties: {},
307+
// settings: {
308+
// label: "Custom Tool",
309+
// icon: <div>I</div>,
310+
// },
311+
// dragPreview: null,
312+
// toolbarComponent: () => {
313+
// return <div><h1>Hello how are you</h1></div>
314+
// },
315+
// elementComponent: () => {
316+
// return <div><h1>Hello how are you</h1></div>
317+
// },
318+
// previewElementComponent: () => {
319+
// return <div><h1>Hello how are you</h1></div>
320+
// },
321+
// styleHelpers: null
322+
// })
304323
};
305324

306325
const onReady: MailUiEditorProps['onReady'] = (mailui) => {
@@ -456,7 +475,8 @@ const BasicExample = () => {
456475
],
457476
},
458477
],
459-
protectedModules: []
478+
protectedModules: [],
479+
customTools: []
460480
}}
461481
/>
462482
</main>

0 commit comments

Comments
 (0)