Spaces:
Running
Running
updar
Browse files
src/App.jsx
CHANGED
|
@@ -16,16 +16,16 @@ function App() {
|
|
| 16 |
};
|
| 17 |
|
| 18 |
return (
|
| 19 |
-
<div className="min-h-screen bg-
|
| 20 |
<div className="text-center mb-8">
|
| 21 |
<h1 className="text-5xl md:text-7xl font-extrabold mb-2 text-transparent bg-clip-text animated-gradient gradient-text">
|
| 22 |
T3XT TR4N5F0RM3R
|
| 23 |
</h1>
|
| 24 |
-
<p className="text-lg md:text-xl text-
|
| 25 |
Your one-stop tool for text conversions
|
| 26 |
</p>
|
| 27 |
</div>
|
| 28 |
-
<div className="w-full max-w-5xl p-6 bg-
|
| 29 |
<Tabs>
|
| 30 |
<Tab label="Morse Code">
|
| 31 |
<MorseCodeConverter addToMessage={addToCompoundedMessage} />
|
|
@@ -48,16 +48,16 @@ function App() {
|
|
| 48 |
</Tabs>
|
| 49 |
</div>
|
| 50 |
|
| 51 |
-
<div className="w-full max-w-5xl p-6 mt-8 bg-
|
| 52 |
<h2 className="text-2xl font-bold mb-4 text-white">Compounded Message</h2>
|
| 53 |
<textarea
|
| 54 |
-
className="w-full h-48 p-2 bg-
|
| 55 |
value={compoundedMessage}
|
| 56 |
readOnly
|
| 57 |
placeholder="Your compounded message will appear here..."
|
| 58 |
/>
|
| 59 |
<button
|
| 60 |
-
className="mt-4 px-4 py-2 bg-
|
| 61 |
onClick={() => navigator.clipboard.writeText(compoundedMessage)}
|
| 62 |
>
|
| 63 |
Copy Compounded Message
|
|
@@ -71,7 +71,7 @@ function App() {
|
|
| 71 |
href="https://github.com/your-github"
|
| 72 |
target="_blank"
|
| 73 |
rel="noopener noreferrer"
|
| 74 |
-
className="text-
|
| 75 |
>
|
| 76 |
Your Name
|
| 77 |
</a>
|
|
|
|
| 16 |
};
|
| 17 |
|
| 18 |
return (
|
| 19 |
+
<div className="min-h-screen bg-black text-white flex flex-col items-center justify-center p-4">
|
| 20 |
<div className="text-center mb-8">
|
| 21 |
<h1 className="text-5xl md:text-7xl font-extrabold mb-2 text-transparent bg-clip-text animated-gradient gradient-text">
|
| 22 |
T3XT TR4N5F0RM3R
|
| 23 |
</h1>
|
| 24 |
+
<p className="text-lg md:text-xl text-white">
|
| 25 |
Your one-stop tool for text conversions
|
| 26 |
</p>
|
| 27 |
</div>
|
| 28 |
+
<div className="w-full max-w-5xl p-6 bg-black border-2 border-white rounded-2xl shadow-2xl">
|
| 29 |
<Tabs>
|
| 30 |
<Tab label="Morse Code">
|
| 31 |
<MorseCodeConverter addToMessage={addToCompoundedMessage} />
|
|
|
|
| 48 |
</Tabs>
|
| 49 |
</div>
|
| 50 |
|
| 51 |
+
<div className="w-full max-w-5xl p-6 mt-8 bg-black border-2 border-white rounded-2xl shadow-2xl">
|
| 52 |
<h2 className="text-2xl font-bold mb-4 text-white">Compounded Message</h2>
|
| 53 |
<textarea
|
| 54 |
+
className="w-full h-48 p-2 bg-black border border-white rounded-md text-white"
|
| 55 |
value={compoundedMessage}
|
| 56 |
readOnly
|
| 57 |
placeholder="Your compounded message will appear here..."
|
| 58 |
/>
|
| 59 |
<button
|
| 60 |
+
className="mt-4 px-4 py-2 bg-invader-pink hover:bg-invader-green rounded-md text-black font-semibold"
|
| 61 |
onClick={() => navigator.clipboard.writeText(compoundedMessage)}
|
| 62 |
>
|
| 63 |
Copy Compounded Message
|
|
|
|
| 71 |
href="https://github.com/your-github"
|
| 72 |
target="_blank"
|
| 73 |
rel="noopener noreferrer"
|
| 74 |
+
className="text-invader-green hover:text-invader-pink transition-colors"
|
| 75 |
>
|
| 76 |
Your Name
|
| 77 |
</a>
|
src/components/Base64Converter.jsx
CHANGED
|
@@ -51,16 +51,16 @@ const Base64Converter = ({ addToMessage }) => {
|
|
| 51 |
};
|
| 52 |
|
| 53 |
return (
|
| 54 |
-
<div className="p-4 bg-
|
| 55 |
<h2 className="text-2xl font-bold mb-4 text-white">Base64 Converter</h2>
|
| 56 |
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
| 57 |
<div>
|
| 58 |
-
<label htmlFor="base64-input" className="block text-sm font-medium text-
|
| 59 |
{toBase64 ? 'Text' : 'Base64'}
|
| 60 |
</label>
|
| 61 |
<textarea
|
| 62 |
id="base64-input"
|
| 63 |
-
className="w-full h-32 p-2 bg-
|
| 64 |
placeholder={toBase64 ? 'Enter text...' : 'Enter Base64...'}
|
| 65 |
value={input}
|
| 66 |
onChange={handleInputChange}
|
|
@@ -70,7 +70,7 @@ const Base64Converter = ({ addToMessage }) => {
|
|
| 70 |
<div className="flex justify-center">
|
| 71 |
<button
|
| 72 |
onClick={swapConversion}
|
| 73 |
-
className="p-2 bg-
|
| 74 |
title="Swap conversion direction"
|
| 75 |
>
|
| 76 |
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
@@ -80,22 +80,22 @@ const Base64Converter = ({ addToMessage }) => {
|
|
| 80 |
</div>
|
| 81 |
|
| 82 |
<div>
|
| 83 |
-
<label htmlFor="base64-output" className="block text-sm font-medium text-
|
| 84 |
{toBase64 ? 'Base64' : 'Text'}
|
| 85 |
</label>
|
| 86 |
-
<div id="base64-output" className="w-full h-32 p-2 bg-
|
| 87 |
{output}
|
| 88 |
{output && !output.startsWith('Error:') && (
|
| 89 |
<div className="absolute top-2 right-2 flex flex-col gap-2">
|
| 90 |
<button
|
| 91 |
onClick={copyToClipboard}
|
| 92 |
-
className="px-3 py-1 bg-
|
| 93 |
>
|
| 94 |
{copied ? 'Copied!' : 'Copy'}
|
| 95 |
</button>
|
| 96 |
<button
|
| 97 |
onClick={() => addToMessage(output)}
|
| 98 |
-
className="px-3 py-1 bg-green
|
| 99 |
>
|
| 100 |
Add
|
| 101 |
</button>
|
|
|
|
| 51 |
};
|
| 52 |
|
| 53 |
return (
|
| 54 |
+
<div className="p-4 bg-black rounded-lg">
|
| 55 |
<h2 className="text-2xl font-bold mb-4 text-white">Base64 Converter</h2>
|
| 56 |
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
| 57 |
<div>
|
| 58 |
+
<label htmlFor="base64-input" className="block text-sm font-medium text-white mb-2">
|
| 59 |
{toBase64 ? 'Text' : 'Base64'}
|
| 60 |
</label>
|
| 61 |
<textarea
|
| 62 |
id="base64-input"
|
| 63 |
+
className="w-full h-32 p-2 bg-black border border-white rounded-md text-white focus:ring-invader-pink focus:border-invader-pink"
|
| 64 |
placeholder={toBase64 ? 'Enter text...' : 'Enter Base64...'}
|
| 65 |
value={input}
|
| 66 |
onChange={handleInputChange}
|
|
|
|
| 70 |
<div className="flex justify-center">
|
| 71 |
<button
|
| 72 |
onClick={swapConversion}
|
| 73 |
+
className="p-2 bg-black border border-white text-white rounded-full hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 74 |
title="Swap conversion direction"
|
| 75 |
>
|
| 76 |
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
| 80 |
</div>
|
| 81 |
|
| 82 |
<div>
|
| 83 |
+
<label htmlFor="base64-output" className="block text-sm font-medium text-white mb-2">
|
| 84 |
{toBase64 ? 'Base64' : 'Text'}
|
| 85 |
</label>
|
| 86 |
+
<div id="base64-output" className="w-full h-32 p-2 bg-black border border-white rounded-md text-white relative">
|
| 87 |
{output}
|
| 88 |
{output && !output.startsWith('Error:') && (
|
| 89 |
<div className="absolute top-2 right-2 flex flex-col gap-2">
|
| 90 |
<button
|
| 91 |
onClick={copyToClipboard}
|
| 92 |
+
className="px-3 py-1 bg-invader-pink text-black rounded-md hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 93 |
>
|
| 94 |
{copied ? 'Copied!' : 'Copy'}
|
| 95 |
</button>
|
| 96 |
<button
|
| 97 |
onClick={() => addToMessage(output)}
|
| 98 |
+
className="px-3 py-1 bg-invader-green text-black rounded-md hover:bg-invader-pink focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-green"
|
| 99 |
>
|
| 100 |
Add
|
| 101 |
</button>
|
src/components/BinaryConverter.jsx
CHANGED
|
@@ -50,14 +50,14 @@ const BinaryConverter = ({ addToMessage }) => {
|
|
| 50 |
};
|
| 51 |
|
| 52 |
return (
|
| 53 |
-
<div className="p-4 bg-
|
| 54 |
<h2 className="text-2xl font-bold mb-4 text-white">Binary Converter</h2>
|
| 55 |
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
| 56 |
<div>
|
| 57 |
-
<label htmlFor="binary-input" className="block text-sm font-medium text-
|
| 58 |
<textarea
|
| 59 |
id="binary-input"
|
| 60 |
-
className="w-full h-32 p-2 bg-
|
| 61 |
placeholder={toBinary ? "Enter text to convert to binary" : "Enter binary to convert to text"}
|
| 62 |
value={input}
|
| 63 |
onChange={handleInputChange}
|
|
@@ -66,7 +66,7 @@ const BinaryConverter = ({ addToMessage }) => {
|
|
| 66 |
<div className="flex justify-center">
|
| 67 |
<button
|
| 68 |
onClick={swapConversion}
|
| 69 |
-
className="p-2 bg-
|
| 70 |
title="Swap conversion direction"
|
| 71 |
>
|
| 72 |
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
@@ -75,20 +75,20 @@ const BinaryConverter = ({ addToMessage }) => {
|
|
| 75 |
</button>
|
| 76 |
</div>
|
| 77 |
<div>
|
| 78 |
-
<label htmlFor="binary-output" className="block text-sm font-medium text-
|
| 79 |
-
<div id="binary-output" className="w-full h-32 p-2 bg-
|
| 80 |
{output}
|
| 81 |
{output && (
|
| 82 |
<div className="absolute top-2 right-2 flex flex-col gap-2">
|
| 83 |
<button
|
| 84 |
onClick={copyToClipboard}
|
| 85 |
-
className="px-3 py-1 bg-
|
| 86 |
>
|
| 87 |
{copied ? 'Copied!' : 'Copy'}
|
| 88 |
</button>
|
| 89 |
<button
|
| 90 |
onClick={() => addToMessage(output)}
|
| 91 |
-
className="px-3 py-1 bg-green
|
| 92 |
>
|
| 93 |
Add
|
| 94 |
</button>
|
|
|
|
| 50 |
};
|
| 51 |
|
| 52 |
return (
|
| 53 |
+
<div className="p-4 bg-black rounded-lg">
|
| 54 |
<h2 className="text-2xl font-bold mb-4 text-white">Binary Converter</h2>
|
| 55 |
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
| 56 |
<div>
|
| 57 |
+
<label htmlFor="binary-input" className="block text-sm font-medium text-white mb-2">{toBinary ? 'Text' : 'Binary'}</label>
|
| 58 |
<textarea
|
| 59 |
id="binary-input"
|
| 60 |
+
className="w-full h-32 p-2 bg-black border border-white rounded-md text-white focus:ring-invader-pink focus:border-invader-pink"
|
| 61 |
placeholder={toBinary ? "Enter text to convert to binary" : "Enter binary to convert to text"}
|
| 62 |
value={input}
|
| 63 |
onChange={handleInputChange}
|
|
|
|
| 66 |
<div className="flex justify-center">
|
| 67 |
<button
|
| 68 |
onClick={swapConversion}
|
| 69 |
+
className="p-2 bg-black border border-white text-white rounded-full hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 70 |
title="Swap conversion direction"
|
| 71 |
>
|
| 72 |
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
| 75 |
</button>
|
| 76 |
</div>
|
| 77 |
<div>
|
| 78 |
+
<label htmlFor="binary-output" className="block text-sm font-medium text-white mb-2">{toBinary ? 'Binary' : 'Text'}</label>
|
| 79 |
+
<div id="binary-output" className="w-full h-32 p-2 bg-black border border-white rounded-md text-white relative">
|
| 80 |
{output}
|
| 81 |
{output && (
|
| 82 |
<div className="absolute top-2 right-2 flex flex-col gap-2">
|
| 83 |
<button
|
| 84 |
onClick={copyToClipboard}
|
| 85 |
+
className="px-3 py-1 bg-invader-pink text-black rounded-md hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 86 |
>
|
| 87 |
{copied ? 'Copied!' : 'Copy'}
|
| 88 |
</button>
|
| 89 |
<button
|
| 90 |
onClick={() => addToMessage(output)}
|
| 91 |
+
className="px-3 py-1 bg-invader-green text-black rounded-md hover:bg-invader-pink focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-green"
|
| 92 |
>
|
| 93 |
Add
|
| 94 |
</button>
|
src/components/BrowserView.jsx
CHANGED
|
@@ -18,7 +18,7 @@ const BrowserView = () => {
|
|
| 18 |
};
|
| 19 |
|
| 20 |
return (
|
| 21 |
-
<div className="p-4 bg-
|
| 22 |
<h2 className="text-2xl font-bold mb-4">Browser</h2>
|
| 23 |
<div className="flex space-x-2 mb-4">
|
| 24 |
<input
|
|
@@ -26,11 +26,11 @@ const BrowserView = () => {
|
|
| 26 |
value={url}
|
| 27 |
onChange={handleUrlChange}
|
| 28 |
placeholder="Enter a URL"
|
| 29 |
-
className="w-full p-2 bg-
|
| 30 |
/>
|
| 31 |
<button
|
| 32 |
onClick={handleLoadUrl}
|
| 33 |
-
className="px-4 py-2 bg-
|
| 34 |
>
|
| 35 |
Load
|
| 36 |
</button>
|
|
@@ -38,7 +38,7 @@ const BrowserView = () => {
|
|
| 38 |
{iframeUrl && (
|
| 39 |
<iframe
|
| 40 |
src={iframeUrl}
|
| 41 |
-
className="w-full h-96 rounded-md border border-
|
| 42 |
title="Browser"
|
| 43 |
sandbox="allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
|
| 44 |
/>
|
|
|
|
| 18 |
};
|
| 19 |
|
| 20 |
return (
|
| 21 |
+
<div className="p-4 bg-black rounded-lg text-white">
|
| 22 |
<h2 className="text-2xl font-bold mb-4">Browser</h2>
|
| 23 |
<div className="flex space-x-2 mb-4">
|
| 24 |
<input
|
|
|
|
| 26 |
value={url}
|
| 27 |
onChange={handleUrlChange}
|
| 28 |
placeholder="Enter a URL"
|
| 29 |
+
className="w-full p-2 bg-black border border-white rounded-md text-white focus:ring-invader-pink focus:border-invader-pink"
|
| 30 |
/>
|
| 31 |
<button
|
| 32 |
onClick={handleLoadUrl}
|
| 33 |
+
className="px-4 py-2 bg-invader-pink text-black rounded-md hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 34 |
>
|
| 35 |
Load
|
| 36 |
</button>
|
|
|
|
| 38 |
{iframeUrl && (
|
| 39 |
<iframe
|
| 40 |
src={iframeUrl}
|
| 41 |
+
className="w-full h-96 rounded-md border border-white"
|
| 42 |
title="Browser"
|
| 43 |
sandbox="allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
|
| 44 |
/>
|
src/components/HexConverter.jsx
CHANGED
|
@@ -59,14 +59,14 @@ const HexConverter = ({ addToMessage }) => {
|
|
| 59 |
};
|
| 60 |
|
| 61 |
return (
|
| 62 |
-
<div className="p-4 bg-
|
| 63 |
<h2 className="text-2xl font-bold mb-4 text-white">Hex Converter</h2>
|
| 64 |
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
| 65 |
<div>
|
| 66 |
-
<label htmlFor="hex-input" className="block text-sm font-medium text-
|
| 67 |
<textarea
|
| 68 |
id="hex-input"
|
| 69 |
-
className="w-full h-32 p-2 bg-
|
| 70 |
placeholder={toHex ? "Enter text to convert to hexadecimal" : "Enter hexadecimal to convert to text"}
|
| 71 |
value={input}
|
| 72 |
onChange={handleInputChange}
|
|
@@ -75,7 +75,7 @@ const HexConverter = ({ addToMessage }) => {
|
|
| 75 |
<div className="flex justify-center">
|
| 76 |
<button
|
| 77 |
onClick={swapConversion}
|
| 78 |
-
className="p-2 bg-
|
| 79 |
title="Swap conversion direction"
|
| 80 |
>
|
| 81 |
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
@@ -84,20 +84,20 @@ const HexConverter = ({ addToMessage }) => {
|
|
| 84 |
</button>
|
| 85 |
</div>
|
| 86 |
<div>
|
| 87 |
-
<label htmlFor="hex-output" className="block text-sm font-medium text-
|
| 88 |
-
<div id="hex-output" className="w-full h-32 p-2 bg-
|
| 89 |
{output}
|
| 90 |
{output && !output.startsWith('Error:') && (
|
| 91 |
<div className="absolute top-2 right-2 flex flex-col gap-2">
|
| 92 |
<button
|
| 93 |
onClick={copyToClipboard}
|
| 94 |
-
className="px-3 py-1 bg-
|
| 95 |
>
|
| 96 |
{copied ? 'Copied!' : 'Copy'}
|
| 97 |
</button>
|
| 98 |
<button
|
| 99 |
onClick={() => addToMessage(output)}
|
| 100 |
-
className="px-3 py-1 bg-green
|
| 101 |
>
|
| 102 |
Add
|
| 103 |
</button>
|
|
|
|
| 59 |
};
|
| 60 |
|
| 61 |
return (
|
| 62 |
+
<div className="p-4 bg-black rounded-lg">
|
| 63 |
<h2 className="text-2xl font-bold mb-4 text-white">Hex Converter</h2>
|
| 64 |
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
| 65 |
<div>
|
| 66 |
+
<label htmlFor="hex-input" className="block text-sm font-medium text-white mb-2">{toHex ? 'Text' : 'Hex'}</label>
|
| 67 |
<textarea
|
| 68 |
id="hex-input"
|
| 69 |
+
className="w-full h-32 p-2 bg-black border border-white rounded-md text-white focus:ring-invader-pink focus:border-invader-pink"
|
| 70 |
placeholder={toHex ? "Enter text to convert to hexadecimal" : "Enter hexadecimal to convert to text"}
|
| 71 |
value={input}
|
| 72 |
onChange={handleInputChange}
|
|
|
|
| 75 |
<div className="flex justify-center">
|
| 76 |
<button
|
| 77 |
onClick={swapConversion}
|
| 78 |
+
className="p-2 bg-black border border-white text-white rounded-full hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 79 |
title="Swap conversion direction"
|
| 80 |
>
|
| 81 |
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
| 84 |
</button>
|
| 85 |
</div>
|
| 86 |
<div>
|
| 87 |
+
<label htmlFor="hex-output" className="block text-sm font-medium text-white mb-2">{toHex ? 'Hex' : 'Text'}</label>
|
| 88 |
+
<div id="hex-output" className="w-full h-32 p-2 bg-black border border-white rounded-md text-white relative">
|
| 89 |
{output}
|
| 90 |
{output && !output.startsWith('Error:') && (
|
| 91 |
<div className="absolute top-2 right-2 flex flex-col gap-2">
|
| 92 |
<button
|
| 93 |
onClick={copyToClipboard}
|
| 94 |
+
className="px-3 py-1 bg-invader-pink text-black rounded-md hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 95 |
>
|
| 96 |
{copied ? 'Copied!' : 'Copy'}
|
| 97 |
</button>
|
| 98 |
<button
|
| 99 |
onClick={() => addToMessage(output)}
|
| 100 |
+
className="px-3 py-1 bg-invader-green text-black rounded-md hover:bg-invader-pink focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-green"
|
| 101 |
>
|
| 102 |
Add
|
| 103 |
</button>
|
src/components/LeetConverter.jsx
CHANGED
|
@@ -56,14 +56,14 @@ const LeetConverter = ({ addToMessage }) => {
|
|
| 56 |
};
|
| 57 |
|
| 58 |
return (
|
| 59 |
-
<div className="p-4 bg-
|
| 60 |
<h2 className="text-2xl font-bold mb-4 text-white">Leet Converter</h2>
|
| 61 |
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
| 62 |
<div>
|
| 63 |
-
<label htmlFor="leet-input" className="block text-sm font-medium text-
|
| 64 |
<textarea
|
| 65 |
id="leet-input"
|
| 66 |
-
className="w-full h-32 p-2 bg-
|
| 67 |
placeholder={toLeet ? 'Enter text...' : 'Enter Leet speak...'}
|
| 68 |
value={input}
|
| 69 |
onChange={handleInputChange}
|
|
@@ -72,7 +72,7 @@ const LeetConverter = ({ addToMessage }) => {
|
|
| 72 |
<div className="flex justify-center">
|
| 73 |
<button
|
| 74 |
onClick={swapConversion}
|
| 75 |
-
className="p-2 bg-
|
| 76 |
title="Swap conversion direction"
|
| 77 |
>
|
| 78 |
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
@@ -81,20 +81,20 @@ const LeetConverter = ({ addToMessage }) => {
|
|
| 81 |
</button>
|
| 82 |
</div>
|
| 83 |
<div>
|
| 84 |
-
<label htmlFor="leet-output" className="block text-sm font-medium text-
|
| 85 |
-
<div id="leet-output" className="w-full h-32 p-2 bg-
|
| 86 |
{output}
|
| 87 |
{output && (
|
| 88 |
<div className="absolute top-2 right-2 flex flex-col gap-2">
|
| 89 |
<button
|
| 90 |
onClick={copyToClipboard}
|
| 91 |
-
className="px-3 py-1 bg-
|
| 92 |
>
|
| 93 |
{copied ? 'Copied!' : 'Copy'}
|
| 94 |
</button>
|
| 95 |
<button
|
| 96 |
onClick={() => addToMessage(output)}
|
| 97 |
-
className="px-3 py-1 bg-green
|
| 98 |
>
|
| 99 |
Add
|
| 100 |
</button>
|
|
|
|
| 56 |
};
|
| 57 |
|
| 58 |
return (
|
| 59 |
+
<div className="p-4 bg-black rounded-lg">
|
| 60 |
<h2 className="text-2xl font-bold mb-4 text-white">Leet Converter</h2>
|
| 61 |
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
| 62 |
<div>
|
| 63 |
+
<label htmlFor="leet-input" className="block text-sm font-medium text-white mb-2">{ toLeet ? 'Text' : 'Leet Speak' }</label>
|
| 64 |
<textarea
|
| 65 |
id="leet-input"
|
| 66 |
+
className="w-full h-32 p-2 bg-black border border-white rounded-md text-white focus:ring-invader-pink focus:border-invader-pink"
|
| 67 |
placeholder={toLeet ? 'Enter text...' : 'Enter Leet speak...'}
|
| 68 |
value={input}
|
| 69 |
onChange={handleInputChange}
|
|
|
|
| 72 |
<div className="flex justify-center">
|
| 73 |
<button
|
| 74 |
onClick={swapConversion}
|
| 75 |
+
className="p-2 bg-black border border-white text-white rounded-full hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 76 |
title="Swap conversion direction"
|
| 77 |
>
|
| 78 |
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
| 81 |
</button>
|
| 82 |
</div>
|
| 83 |
<div>
|
| 84 |
+
<label htmlFor="leet-output" className="block text-sm font-medium text-white mb-2">{ toLeet ? 'Leet Speak' : 'Text' }</label>
|
| 85 |
+
<div id="leet-output" className="w-full h-32 p-2 bg-black border border-white rounded-md text-white relative">
|
| 86 |
{output}
|
| 87 |
{output && (
|
| 88 |
<div className="absolute top-2 right-2 flex flex-col gap-2">
|
| 89 |
<button
|
| 90 |
onClick={copyToClipboard}
|
| 91 |
+
className="px-3 py-1 bg-invader-pink text-black rounded-md hover:bg-invader-green focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-pink"
|
| 92 |
>
|
| 93 |
{copied ? 'Copied!' : 'Copy'}
|
| 94 |
</button>
|
| 95 |
<button
|
| 96 |
onClick={() => addToMessage(output)}
|
| 97 |
+
className="px-3 py-1 bg-invader-green text-black rounded-md hover:bg-invader-pink focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-invader-green"
|
| 98 |
>
|
| 99 |
Add
|
| 100 |
</button>
|