Skip to content

pantoken-root / platforms/email/src / emailTokens

फंक्शन: emailTokens() ​

emailTokens(mode?): Record<string, string>

प्रयोगात्मक

किसी मोड के लिए टोकन मैप चुनें (डिफ़ॉल्ट "light").

पैरामीटर ​

mode? ​

Mode = "light"

वापसी ​

Record<string, string>

उदाहरण ​

इमेल सेल में एक टोकन इनलाइन करें (लाइट मोड)

ts
import { emailTokens } from "@pantoken/email";

const t = emailTokens();
const html = `<td style="background:${t.colorBackgroundBrand};color:${t.colorTextOnColor}">Hi</td>`;

डार्क मोड

ts
import { emailTokens } from "@pantoken/email";

const t = emailTokens("dark");