Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
styled-email-components
Advanced tools
Readme
styled-components
for emails. This is an
extension of original API which adopts React Native like approach of injecting
styles.
styled-components
is a universal styling solution for various target
environments with great developer experience and low learning curve.
Unfortunately there's no way of using it natively to build React-based emails
due to email clients limitations. This module adds all nessecary features to
build mail-first components.
# yarn
yarn add styled-email-components styled-components
# npm
npm install --save styled-email-components styled-components
ℹ️ Don't forget to install styled-components
itself as a peer dependency.
styled-email-components
uses same syntax to define components:
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import styled from 'styled-email-components';
const Link = styled.a`
font-family: sans-serif;
background: blue;
color: white;
`;
// That works 😱
console.assert(
renderToStaticMarkup(<Link href="https://example.com">Hey</Link>),
'<a href="https://example.com" style="font-family:sans-serif;background-color:blue;color:white;">Hey</a>',
);
Check original Gettings Started for more examples.
These are key differences compared to original implementation:
styled.*
aliases uses
XHTML 1.0 Transitional
list of elements instead of HTML5styled.vml.*
, styled.wml.*
and styled.office.*
elements are proxiedstyled-email-components
modifies only styled
implementation and mirrors rest
of API as-is:
MIT © Sergey Bekrin
FAQs
💌 styled-components for emails
The npm package styled-email-components receives a total of 220 weekly downloads. As such, styled-email-components popularity was classified as not popular.
We found that styled-email-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.