File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed
Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments