@react-email/button 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
 
3
- declare type RootProps = React.ComponentPropsWithoutRef<"a">;
3
+ type RootProps = React.ComponentPropsWithoutRef<"a">;
4
4
  interface ButtonProps extends RootProps {
5
5
  pX?: number;
6
6
  pY?: number;
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ var pxToPt = (px) => isNaN(Number(px)) ? null : parseInt(px, 10) * 3 / 4;
39
39
  // src/button.tsx
40
40
  var import_jsx_runtime = require("react/jsx-runtime");
41
41
  var Button = React.forwardRef(
42
- ({ children, style, pX, pY, target = "_blank", ...props }, forwardedRef) => {
42
+ ({ children, style, pX = 0, pY = 0, target = "_blank", ...props }, forwardedRef) => {
43
43
  const y = (pY || 0) * 2;
44
44
  const textRaise = pxToPt(y.toString());
45
45
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ var pxToPt = (px) => isNaN(Number(px)) ? null : parseInt(px, 10) * 3 / 4;
7
7
  // src/button.tsx
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  var Button = React.forwardRef(
10
- ({ children, style, pX, pY, target = "_blank", ...props }, forwardedRef) => {
10
+ ({ children, style, pX = 0, pY = 0, target = "_blank", ...props }, forwardedRef) => {
11
11
  const y = (pY || 0) * 2;
12
12
  const textRaise = pxToPt(y.toString());
13
13
  return /* @__PURE__ */ jsxs(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/button",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "A link that is styled to look like a button",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,18 @@
9
9
  "files": [
10
10
  "dist/**"
11
11
  ],
12
+ "exports": {
13
+ ".": {
14
+ "import": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.mjs"
17
+ },
18
+ "require": {
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
21
+ }
22
+ }
23
+ },
12
24
  "license": "MIT",
13
25
  "scripts": {
14
26
  "build": "tsup src/index.ts --format esm,cjs --dts --external react",
@@ -36,18 +48,18 @@
36
48
  "react": "18.2.0"
37
49
  },
38
50
  "devDependencies": {
39
- "@babel/preset-react": "7.18.6",
51
+ "@babel/preset-react": "7.22.5",
40
52
  "@react-email/render": "0.0.6",
41
- "@types/jest": "29.5.0",
53
+ "@types/jest": "29.5.3",
42
54
  "@types/react": "18.0.20",
43
55
  "@types/react-dom": "18.0.6",
44
56
  "babel-jest": "28.1.3",
45
- "eslint": "8.23.1",
57
+ "eslint": "8.45.0",
46
58
  "jest": "28.1.3",
47
- "prettier": "2.8.4",
59
+ "prettier": "3.0.0",
48
60
  "ts-jest": "28.0.8",
49
61
  "tsup": "6.2.3",
50
- "typescript": "4.8.3"
62
+ "typescript": "5.1.6"
51
63
  },
52
64
  "publishConfig": {
53
65
  "access": "public"