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

@react-email/button

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-email/button - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

95

dist/index.js

@@ -183,2 +183,46 @@ "use strict";

// ../utils/dist/spaces.js
var require_spaces = __commonJS({
"../utils/dist/spaces.js"(exports) {
"use strict";
var __assign = exports && exports.__assign || function() {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
exports.__esModule = true;
exports.withMargin = void 0;
var withMargin = function(props) {
return [
withSpace(props.m, ["margin"]),
withSpace(props.mx, ["marginLeft", "marginRight"]),
withSpace(props.my, ["marginTop", "marginBottom"]),
withSpace(props.mt, ["marginTop"]),
withSpace(props.mr, ["marginRight"]),
withSpace(props.mb, ["marginBottom"]),
withSpace(props.ml, ["marginLeft"])
].filter(function(s) {
return Object.keys(s).length;
})[0];
};
exports.withMargin = withMargin;
var withSpace = function(value, properties) {
return properties.reduce(function(styles, property) {
var _a;
if (value) {
return __assign(__assign({}, styles), (_a = {}, _a[property] = "".concat(value, "px"), _a));
}
return styles;
}, {});
};
}
});
// ../utils/dist/style-to-string.js

@@ -243,2 +287,3 @@ var require_style_to_string = __commonJS({

__exportStar(require_px_to_pt(), exports);
__exportStar(require_spaces(), exports);
__exportStar(require_style_to_string(), exports);

@@ -264,24 +309,30 @@ __exportStar(require_unreachable(), exports);

const textRaise = (0, import_utils.pxToPt)(y.toString());
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
...props,
ref: forwardedRef,
target,
style: buttonStyle({ ...style, pX, pY }),
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
dangerouslySetInnerHTML: {
__html: `<!--[if mso]><i style="letter-spacing: ${pX}px;mso-font-width:-100%;mso-text-raise:${textRaise}" hidden>&nbsp;</i><![endif]-->`
}
}),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
style: buttonTextStyle({ ...style, pX, pY }),
children
}),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
dangerouslySetInnerHTML: {
__html: `<!--[if mso]><i style="letter-spacing: ${pX}px;mso-font-width:-100%" hidden>&nbsp;</i><![endif]-->`
}
})
]
});
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"a",
{
...props,
ref: forwardedRef,
target,
style: buttonStyle({ ...style, pX, pY }),
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"span",
{
dangerouslySetInnerHTML: {
__html: `<!--[if mso]><i style="letter-spacing: ${pX}px;mso-font-width:-100%;mso-text-raise:${textRaise}" hidden>&nbsp;</i><![endif]-->`
}
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: buttonTextStyle({ ...style, pX, pY }), children }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"span",
{
dangerouslySetInnerHTML: {
__html: `<!--[if mso]><i style="letter-spacing: ${pX}px;mso-font-width:-100%" hidden>&nbsp;</i><![endif]-->`
}
}
)
]
}
);
}

@@ -288,0 +339,0 @@ );

{
"name": "@react-email/button",
"version": "0.0.4",
"description": "A React button component to help build emails",
"version": "0.0.5",
"description": "A link that is styled to look like a button",
"sideEffects": false,

@@ -16,9 +16,21 @@ "main": "./dist/index.js",

"dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
"lint": "TIMING=1 eslint src/**/*.ts* --fix",
"lint": "eslint",
"clean": "rm -rf dist",
"test": "jest",
"test:watch": "jest --watch",
"format:check": "prettier --check \"**/*.{ts,tsx,md}\"",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
"format:check": "prettier --ignore-path ./../../.prettierignore --check \"**/*.{ts,tsx,md}\"",
"format": "prettier --ignore-path ./../../.prettierignore --write \"**/*.{ts,tsx,md}\""
},
"repository": {
"type": "git",
"url": "https://github.com/zenorocha/react-email.git",
"directory": "packages/button"
},
"keywords": [
"react",
"email"
],
"engines": {
"node": ">=18.0.0"
},
"dependencies": {

@@ -44,2 +56,2 @@ "react": "18.2.0"

}
}
}

@@ -1,5 +0,5 @@

![React Email button cover](https://react.email/static/images/readme/covers/button.png)
![React Email button cover](https://react.email/static/covers/button.png)
<div align="center"><strong>@react-email/button</strong></div>
<div align="center">A React button component to help build emails.</div>
<div align="center">A link that is styled to look like a button.</div>
<br />

@@ -57,5 +57,5 @@ <div align="center">

| <img src="https://react.email/static/images/readme/icons/gmail.svg" width="48px" height="48px" alt="Gmail logo"> | <img src="https://react.email/static/images/readme/icons/apple-mail.svg" width="48px" height="48px" alt="Apple Mail"> | <img src="https://react.email/static/images/readme/icons/outlook.svg" width="48px" height="48px" alt="Outlook logo"> | <img src="https://react.email/static/images/readme/icons/yahoo-mail.svg" width="48px" height="48px" alt="Yahoo! Mail logo"> | <img src="https://react.email/static/images/readme/icons/hey.svg" width="48px" height="48px" alt="HEY logo"> | <img src="https://react.email/static/images/readme/icons/superhuman.svg" width="48px" height="48px" alt="Superhuman logo"> |
| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
| <img src="https://react.email/static/icons/gmail.svg" width="48px" height="48px" alt="Gmail logo"> | <img src="https://react.email/static/icons/apple-mail.svg" width="48px" height="48px" alt="Apple Mail"> | <img src="https://react.email/static/icons/outlook.svg" width="48px" height="48px" alt="Outlook logo"> | <img src="https://react.email/static/icons/yahoo-mail.svg" width="48px" height="48px" alt="Yahoo! Mail logo"> | <img src="https://react.email/static/icons/hey.svg" width="48px" height="48px" alt="HEY logo"> | <img src="https://react.email/static/icons/superhuman.svg" width="48px" height="48px" alt="Superhuman logo"> |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |

@@ -62,0 +62,0 @@ ## License

Sorry, the diff of this file is not supported yet

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