@unlock-protocol/email-templates
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Email templates

This sub-repository contains the Unlock email templates

Add template

To add a new template add the new template key inside the index.ts file on Template type. Following to this you need to create a new file with the template and include it in EmailTemplates.

Let's say we need to add a new demo template, there is the following steps:

  1. Inside index.ts we add the new demo key
type Template =
  | 'keyMinde'
  | 'demo'
  1. Create the new template file with EmailTemplateProps definition

demo.ts

export default {
  subject: 'Demo template header',
  html: 'demo template content'
}
  1. Add this file on EmailTemplates inside index.ts
export const EmailTemplates: Record<Partial<Template>, EmailTemplateProps> = {
  // [...] other templates
  demo,
}

Readme

Keywords

none

Package Sidebar

Install

npm i @unlock-protocol/email-templates

Weekly Downloads

0

Version

1.0.1

License

none

Unpacked Size

15.4 kB

Total Files

32

Last publish

Collaborators

  • unlock-dev
  • ops-unlock
  • clemsos
  • julien51