diff --git a/src/app/customizer/box-shadow-generator/page.jsx b/src/app/customizer/box-shadow-generator/page.jsx index d4936775..9b16df8d 100644 --- a/src/app/customizer/box-shadow-generator/page.jsx +++ b/src/app/customizer/box-shadow-generator/page.jsx @@ -38,6 +38,24 @@ const Page = () => { console.error("Failed to copy text: ", err); }); }; + const handleCopyTailwindClick = () => { + navigator.clipboard + .writeText( + `shadow-[${shadow.inset ? "inset_" : ""}${shadow.hOffset}px_${shadow.vOffset}px_${shadow.blur}px_${shadow.spread}px_${shadow.color}]` + + ) + .then(() => { + Swal.fire({ + title: "Operation is complete!", + text: "TailwindCSS code copied to clipboard!", + icon: "success", + confirmButtonColor: "#2563EB", + }); + }) + .catch((err) => { + console.error("Failed to copy text: ", err); + }); + }; return (
{ isDarkMode={isDarkMode} toggleTheme={toggleTheme} /> -
+

Box Shadow Generator @@ -69,7 +87,7 @@ const Page = () => { >

{

{`box-shadow: ${shadow.hOffset}px ${shadow.vOffset}px ${shadow.blur}px ${shadow.spread}px ${shadow.color} ${shadow.inset ? "inset" : ""};`}

+

+ {`shadow-[${shadow.inset ? "inset_" : ""}${shadow.hOffset}px_${shadow.vOffset}px_${shadow.blur}px_${shadow.spread}px_${shadow.color}]`} +

+
+ +