New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-email/heading

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-email/heading - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

35

dist/index.js

@@ -37,9 +37,30 @@ "use strict";

var import_jsx_runtime = require("react/jsx-runtime");
var Heading = React.forwardRef(({ as: Tag = "h1", children, style, ...props }, forwardedRef) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_slot.Slot, {
ref: forwardedRef,
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, {
children
})
}));
var Heading = React.forwardRef(({ as: Tag = "h1", children, style, ...props }, forwardedRef) => {
const styles = { ...style, ...getDefaultStyles(Tag) };
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_slot.Slot, {
ref: forwardedRef,
style: styles,
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, {
children
})
});
});
var getDefaultStyles = (as) => {
switch (as) {
default:
case "h1":
return { margin: ".67em 0", fontSize: "2em" };
case "h2":
return { margin: ".83em 0", fontSize: "1.5em" };
case "h3":
return { margin: "1em 0", fontSize: "1.17em" };
case "h4":
return { margin: "1.33em 0", fontSize: "1em" };
case "h5":
return { margin: "1.67em 0", fontSize: ".83em" };
case "h6":
return { margin: "2.33em 0", fontSize: ".67em" };
}
};
Heading.displayName = "Heading";

@@ -46,0 +67,0 @@ // Annotate the CommonJS export names for ESM import in node:

{
"name": "@react-email/heading",
"version": "0.0.1",
"version": "0.0.2",
"description": "A block of heading text",

@@ -25,3 +25,4 @@ "sideEffects": false,

"@radix-ui/react-slot": "1.0.0",
"react": "18.2.0"
"react": "18.2.0",
"utils": "*"
},

@@ -28,0 +29,0 @@ "devDependencies": {

dist/index.mjs

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