Skip to content

Commit b5a94d3

Browse files
committed
Added custom display condition in basic example template
1 parent 86a051f commit b5a94d3

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

example/basic/index.tsx

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ const displayConditions = [
2525
label: "Children",
2626
description: "All children customers",
2727
key: "ischild",
28+
},
29+
{
30+
label: "Custom",
31+
description: "All custom customers",
32+
before: "{{#custom}}",
33+
after: "{{/custom}}",
2834
}
2935
]
3036

@@ -266,15 +272,15 @@ const BasicExample = () => {
266272
console.log("library:saveAuthAlert", params);
267273
done(true);
268274
});
269-
mailui.registerCallback("displayCondition", async (params: object, done: Function) => {
270-
console.log("displayCondition", params?.condition);
271-
272-
done({
273-
label: "Men",
274-
description: "All man customers",
275-
key: "ismen",
276-
})
277-
});
275+
// mailui.registerCallback("displayCondition", async (params: object, done: Function) => {
276+
// console.log("displayCondition", params?.condition);
277+
//
278+
// done({
279+
// label: "Men",
280+
// description: "All man customers",
281+
// key: "ismen",
282+
// })
283+
// });
278284

279285
mailui.registerCallback("previewHtml", async (params: object, done: Function) => {
280286
console.log("previewHtml", params);
@@ -476,7 +482,10 @@ const BasicExample = () => {
476482
},
477483
],
478484
protectedModules: [],
479-
customTools: []
485+
customTools: [],
486+
customJS: [
487+
'http://localhost:3000/custom.js'
488+
]
480489
}}
481490
/>
482491
</main>

0 commit comments

Comments
 (0)