@react-email/button 0.0.17-canary.0 → 0.0.17
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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +2 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
type ButtonProps = React.ComponentPropsWithoutRef<"a"
|
|
3
|
+
type ButtonProps = Readonly<React.ComponentPropsWithoutRef<"a">>;
|
|
4
4
|
declare const Button: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">> & React.RefAttributes<HTMLAnchorElement>>;
|
|
5
5
|
|
|
6
6
|
export { Button, ButtonProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
type ButtonProps = React.ComponentPropsWithoutRef<"a"
|
|
3
|
+
type ButtonProps = Readonly<React.ComponentPropsWithoutRef<"a">>;
|
|
4
4
|
declare const Button: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">> & React.RefAttributes<HTMLAnchorElement>>;
|
|
5
5
|
|
|
6
6
|
export { Button, ButtonProps };
|
package/dist/index.js
CHANGED
|
@@ -66,9 +66,6 @@ module.exports = __toCommonJS(src_exports);
|
|
|
66
66
|
// src/button.tsx
|
|
67
67
|
var React = __toESM(require("react"));
|
|
68
68
|
|
|
69
|
-
// src/utils/px-to-pt.ts
|
|
70
|
-
var pxToPt = (px) => typeof px === "number" && !isNaN(Number(px)) ? px * 3 / 4 : null;
|
|
71
|
-
|
|
72
69
|
// src/utils/parse-padding.ts
|
|
73
70
|
function convertToPx(value) {
|
|
74
71
|
let px = 0;
|
|
@@ -154,6 +151,9 @@ function parsePadding({
|
|
|
154
151
|
};
|
|
155
152
|
}
|
|
156
153
|
|
|
154
|
+
// src/utils/px-to-pt.ts
|
|
155
|
+
var pxToPt = (px) => typeof px === "number" && !isNaN(Number(px)) ? px * 3 / 4 : null;
|
|
156
|
+
|
|
157
157
|
// src/button.tsx
|
|
158
158
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
159
159
|
function computeFontWidthAndSpaceCount(expectedWidth) {
|
|
@@ -223,7 +223,8 @@ var buttonStyle = (style) => {
|
|
|
223
223
|
lineHeight: "100%",
|
|
224
224
|
textDecoration: "none",
|
|
225
225
|
display: "inline-block",
|
|
226
|
-
maxWidth: "100%"
|
|
226
|
+
maxWidth: "100%",
|
|
227
|
+
msoPaddingAlt: "0px"
|
|
227
228
|
}, rest), {
|
|
228
229
|
padding: `${pt}px ${pr}px ${pb}px ${pl}px`
|
|
229
230
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -33,9 +33,6 @@ var __objRest = (source, exclude) => {
|
|
|
33
33
|
// src/button.tsx
|
|
34
34
|
import * as React from "react";
|
|
35
35
|
|
|
36
|
-
// src/utils/px-to-pt.ts
|
|
37
|
-
var pxToPt = (px) => typeof px === "number" && !isNaN(Number(px)) ? px * 3 / 4 : null;
|
|
38
|
-
|
|
39
36
|
// src/utils/parse-padding.ts
|
|
40
37
|
function convertToPx(value) {
|
|
41
38
|
let px = 0;
|
|
@@ -121,6 +118,9 @@ function parsePadding({
|
|
|
121
118
|
};
|
|
122
119
|
}
|
|
123
120
|
|
|
121
|
+
// src/utils/px-to-pt.ts
|
|
122
|
+
var pxToPt = (px) => typeof px === "number" && !isNaN(Number(px)) ? px * 3 / 4 : null;
|
|
123
|
+
|
|
124
124
|
// src/button.tsx
|
|
125
125
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
126
126
|
function computeFontWidthAndSpaceCount(expectedWidth) {
|
|
@@ -190,7 +190,8 @@ var buttonStyle = (style) => {
|
|
|
190
190
|
lineHeight: "100%",
|
|
191
191
|
textDecoration: "none",
|
|
192
192
|
display: "inline-block",
|
|
193
|
-
maxWidth: "100%"
|
|
193
|
+
maxWidth: "100%",
|
|
194
|
+
msoPaddingAlt: "0px"
|
|
194
195
|
}, rest), {
|
|
195
196
|
padding: `${pt}px ${pr}px ${pb}px ${pl}px`
|
|
196
197
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-email/button",
|
|
3
|
-
"version": "0.0.17
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "A link that is styled to look like a button",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,9 +38,8 @@
|
|
|
38
38
|
"react": "^18.0 || ^19.0 || ^19.0.0-rc"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/preset-react": "7.23.3",
|
|
42
41
|
"typescript": "5.1.6",
|
|
43
|
-
"@react-email/render": "
|
|
42
|
+
"@react-email/render": "1.0.0",
|
|
44
43
|
"tsconfig": "0.0.0",
|
|
45
44
|
"eslint-config-custom": "0.0.0"
|
|
46
45
|
},
|