Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crosslead-notification-email

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crosslead-notification-email

crosslead-notification-email

  • 0.0.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

crosslead-notification-email

This package is used by the CrossLead Platform to render notifications into html emails.

An (incomplete) set of stateless React components is exported, each of which has its own props objects. A renderMail function is exported that embeds a resulting React.Element into a complete HTML document. Example usage:

const props = {...};
renderMail(UserAdded(props));

Each component also has a corresponding 'core' component, eg., UserAddedCore

These components only provide the core of the body, and not the header and footer. They are used when the desired output is an aggregation of components, the single current example of which is the ``NotificationDigest``` component, the props object of which accepts arrays of already-rendered 'core' components.

This package also provides a command line interface via a 'main' script.

Example usages:

Generate an email for the given component:

$ npm run main -- --generate --<component> --out=<component>.html;

Generate an email for the given component and send it out via email:

$ npm run main -- --generate --<component> --user=<SMTP User>
--pass=<Base64 encoded SMTP password> --email=<Destination Email Address>;

As a development aid, main is also able to extract styles that have been scraped from a 'Sketch Site'.
If you look at index.html in such a site, you'll find a gob of data being passed to an SMApp function. Pull that data out into a json file. Each artboard in the site has its own section in the data. A given artboard is a collection of layers; each layer gets its own styling information.

The following command will extract the styles of artboard 0 into a javascript module containing typestyle-style styles of named STYLE${n}, where n is the layer id. This module can then be incorporated into tsx code that needs those styles. Obviously, it is recommended to rename those symbols to something more semantic.

$ npm run main -- --extractStyles --datafile= --artboard=0 --out=foo.styles.ts

FAQs

Package last updated on 05 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc