@react-email/button
Advanced tools
Comparing version 0.0.17 to 0.0.18-canary.0
@@ -6,2 +6,2 @@ import * as React from 'react'; | ||
export { Button, ButtonProps }; | ||
export { Button, type ButtonProps }; |
@@ -159,8 +159,16 @@ "use strict"; | ||
var import_jsx_runtime = require("react/jsx-runtime"); | ||
var maxFontWidth = 5; | ||
function computeFontWidthAndSpaceCount(expectedWidth) { | ||
if (expectedWidth === 0) return [0, 0]; | ||
let smallestSpaceCount = 0; | ||
while (expectedWidth / smallestSpaceCount / 2 > 5) { | ||
const computeRequiredFontWidth = () => { | ||
if (smallestSpaceCount > 0) { | ||
return expectedWidth / smallestSpaceCount / 2; | ||
} | ||
return Infinity; | ||
}; | ||
while (computeRequiredFontWidth() > maxFontWidth) { | ||
smallestSpaceCount++; | ||
} | ||
return [expectedWidth / smallestSpaceCount / 2, smallestSpaceCount]; | ||
return [computeRequiredFontWidth(), smallestSpaceCount]; | ||
} | ||
@@ -167,0 +175,0 @@ var Button = React.forwardRef( |
{ | ||
"name": "@react-email/button", | ||
"version": "0.0.17", | ||
"version": "0.0.18-canary.0", | ||
"description": "A link that is styled to look like a button", | ||
@@ -42,5 +42,5 @@ "sideEffects": false, | ||
"typescript": "5.1.6", | ||
"@react-email/render": "1.0.0", | ||
"tsconfig": "0.0.0", | ||
"eslint-config-custom": "0.0.0" | ||
"eslint-config-custom": "0.0.0", | ||
"@react-email/render": "1.0.1", | ||
"tsconfig": "0.0.0" | ||
}, | ||
@@ -47,0 +47,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22080
465