thank-you-tweet-button-001
Advanced tools
Comparing version 2.0.3 to 3.0.0
@@ -5,2 +5,3 @@ import React from "react"; | ||
number?: number; | ||
bestNPMPackage: string; | ||
rating: number; | ||
@@ -7,0 +8,0 @@ } |
@@ -17,4 +17,4 @@ "use strict"; | ||
function TweetButton(props) { | ||
var tweetURL = "https://twitter.com/intent/tweet?text=Thank+you,+%40oluwatobiss.+Your+book+helped+me+create,+test,+and+publish+".concat(props.number && props.number > 1 ? props.number : "an", "+NPM+").concat(props.number && props.number > 1 ? "packages" : "package", ".%0A%0AI'm+giving+it+a+").concat(props.rating, "-star+rating!+").concat(generateStarIcons(props.rating), "+%0A%0ACreating%20NPM%20Package:%20React%20TypeScript%20Guide%0A%0Ahttps%3A%2F%2Famzn.to/3qxnEdF"); | ||
return props.rating ? (react_1.default.createElement("section", { className: "tweet-btn-container" }, | ||
var tweetURL = "https://twitter.com/intent/tweet?text=Thank+you,+%40oluwatobiss.+Your+book+helped+me+create,+test,+and+publish+".concat(props.number && props.number > 1 ? props.number : "an", "+NPM+").concat(props.number && props.number > 1 ? "packages" : "package", ".%0A%0AMy+best+one+is:+").concat(props.bestNPMPackage, "%0A%0AI'm+giving+it+a+").concat(props.rating, "-star+rating!+").concat(generateStarIcons(props.rating), "+%0A%0ACreating%20NPM%20Package:%20React%20TypeScript%20Guide%0A%0Ahttps%3A%2F%2Famzn.to/3qxnEdF"); | ||
return props.rating && props.bestNPMPackage ? (react_1.default.createElement("section", { className: "tweet-btn-container" }, | ||
react_1.default.createElement("a", { className: "tweet-button", href: tweetURL, target: "_blank" }, "Send a thank you tweet"))) : (react_1.default.createElement("div", { style: { | ||
@@ -31,4 +31,4 @@ display: "flex", | ||
padding: "15px 20px", | ||
} }, "\u24D8 Error: Props 'rating' is missing in 'TweetButtonPropsType'."))); | ||
} }, "\u24D8 Error: One or more required props are missing in 'TweetButtonPropsType'."))); | ||
} | ||
exports.default = TweetButton; |
@@ -5,2 +5,3 @@ import React from "react"; | ||
number?: number; | ||
bestNPMPackage: string; | ||
rating: number; | ||
@@ -7,0 +8,0 @@ } |
@@ -12,4 +12,4 @@ import React from "react"; | ||
export default function TweetButton(props) { | ||
var tweetURL = "https://twitter.com/intent/tweet?text=Thank+you,+%40oluwatobiss.+Your+book+helped+me+create,+test,+and+publish+".concat(props.number && props.number > 1 ? props.number : "an", "+NPM+").concat(props.number && props.number > 1 ? "packages" : "package", ".%0A%0AI'm+giving+it+a+").concat(props.rating, "-star+rating!+").concat(generateStarIcons(props.rating), "+%0A%0ACreating%20NPM%20Package:%20React%20TypeScript%20Guide%0A%0Ahttps%3A%2F%2Famzn.to/3qxnEdF"); | ||
return props.rating ? (React.createElement("section", { className: "tweet-btn-container" }, | ||
var tweetURL = "https://twitter.com/intent/tweet?text=Thank+you,+%40oluwatobiss.+Your+book+helped+me+create,+test,+and+publish+".concat(props.number && props.number > 1 ? props.number : "an", "+NPM+").concat(props.number && props.number > 1 ? "packages" : "package", ".%0A%0AMy+best+one+is:+").concat(props.bestNPMPackage, "%0A%0AI'm+giving+it+a+").concat(props.rating, "-star+rating!+").concat(generateStarIcons(props.rating), "+%0A%0ACreating%20NPM%20Package:%20React%20TypeScript%20Guide%0A%0Ahttps%3A%2F%2Famzn.to/3qxnEdF"); | ||
return props.rating && props.bestNPMPackage ? (React.createElement("section", { className: "tweet-btn-container" }, | ||
React.createElement("a", { className: "tweet-button", href: tweetURL, target: "_blank" }, "Send a thank you tweet"))) : (React.createElement("div", { style: { | ||
@@ -26,3 +26,3 @@ display: "flex", | ||
padding: "15px 20px", | ||
} }, "\u24D8 Error: Props 'rating' is missing in 'TweetButtonPropsType'."))); | ||
} }, "\u24D8 Error: One or more required props are missing in 'TweetButtonPropsType'."))); | ||
} |
{ | ||
"name": "thank-you-tweet-button-001", | ||
"version": "2.0.3", | ||
"version": "3.0.0", | ||
"description": "Easy-to-use tweet button for saying thank you to @oluwatobiss.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/TweetButton.js", |
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
8386
99