Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
santushnath committed Jul 21, 2024
1 parent 372c82b commit 86a051f
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions example/basic/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,35 @@ 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;
}, {});

done(data)
});

mailui?.setDisplayConditions(displayConditions)

// mailui?.registerCustomTool({
// initialProperties: {},
// settings: {
// label: "Custom Tool",
// icon: <div>I</div>,
// },
// dragPreview: null,
// toolbarComponent: () => {
// return <div><h1>Hello how are you</h1></div>
// },
// elementComponent: () => {
// return <div><h1>Hello how are you</h1></div>
// },
// previewElementComponent: () => {
// return <div><h1>Hello how are you</h1></div>
// },
// styleHelpers: null
// })
};

const onReady: MailUiEditorProps['onReady'] = (mailui) => {
Expand Down Expand Up @@ -456,7 +475,8 @@ const BasicExample = () => {
],
},
],
protectedModules: []
protectedModules: [],
customTools: []
}}
/>
</main>
Expand Down

0 comments on commit 86a051f

Please sign in to comment.