Skip to content

Commit 9cc9aee

Browse files
🤖 Merge PR DefinitelyTyped#75261 [Poool-Engage] - Add theme config option support. by @maximedasilva
1 parent 8bd5c7a commit 9cc9aee

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎types/poool-engage/index.d.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ export namespace Poool {
7070
* More infos: https://www.poool.dev/docs/engage/javascript/configuration#gtagautotrackingenabled
7171
*/
7272
gtagAutoTrackingEnabled?: boolean;
73+
74+
/**
75+
* Enable/disable dark mode for engage elements.
76+
*
77+
* Light mode is used by default, but you can force dark mode or let the engage elements adapt to the user's system preferences with the `auto` option.
78+
*
79+
* default: `light`
80+
*
81+
* More infos: https://www.poool.dev/docs/engage/javascript/configuration#theme
82+
*/
83+
theme?: "light" | "dark" | "auto";
7384
}
7485

7586
interface EngageConfig {

‎types/poool-engage/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@types/poool-engage",
4-
"version": "2.2.9999",
4+
"version": "2.3.9999",
55
"nonNpm": true,
66
"nonNpmDescription": "poool-engage",
77
"projects": [

‎types/poool-engage/poool-engage-tests.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ engage.createElement("key", "value");
5050
// $ExpectType Promise<EngageElement>
5151
Engage.createElement("key", "target", { filters: ["filter1", "filter2"] });
5252

53+
// $ExpectType Engage
54+
engage.config(
55+
{
56+
theme: "dark",
57+
},
58+
);
59+
5360
// $ExpectType Engage
5461
engage.config(
5562
{

0 commit comments

Comments
 (0)