copy button
This commit is contained in:
parent
3f96e51571
commit
0230cd134e
1 changed files with 15 additions and 3 deletions
16
src/App.tsx
16
src/App.tsx
|
@ -67,9 +67,21 @@ function App() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-center">
|
||||||
<div
|
<div
|
||||||
class="w-64 h-12 overflow-x-auto whitespace-nowrap border border-primaryLight text-primaryLight p-2">
|
class="w-64 h-12 overflow-x-auto whitespace-nowrap border border-primaryLight text-primaryLight p-2 flex items-center justify-between"
|
||||||
{message()}
|
>
|
||||||
|
<span>{message()}</span>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
class="ml-2 px-2 py-1 text-sm text-white bg-primaryLight rounded focus:outline-none"
|
||||||
|
onClick={() => {
|
||||||
|
navigator.clipboard.writeText(message());
|
||||||
|
alert("Copied to clipboard!");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Copy
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="fixed bottom-0 left-0 m-2 z-50">
|
<div class="fixed bottom-0 left-0 m-2 z-50">
|
||||||
<a class="text-primaryLight underline" href="https://ko-fi.com/amyarson">support me ♥</a>
|
<a class="text-primaryLight underline" href="https://ko-fi.com/amyarson">support me ♥</a>
|
||||||
|
|
Loading…
Reference in a new issue