diff options
| author | houston[bot] <astrobot-houston@users.noreply.github.com> | 2025-06-12 22:12:30 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2025-06-12 22:12:30 +0200 |
| commit | 0f65b996085d8aa76029163817bf7f28215cd5d6 (patch) | |
| tree | ca6042b00b50d6712b401630932582c938ccb12d /src/components/Counter.jsx | |
Initial commit from Astro
Diffstat (limited to 'src/components/Counter.jsx')
| -rw-r--r-- | src/components/Counter.jsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/components/Counter.jsx b/src/components/Counter.jsx new file mode 100644 index 0000000..8661dc0 --- /dev/null +++ b/src/components/Counter.jsx @@ -0,0 +1,16 @@ +import { useState } from 'react'; + +export default function Counter() { + const [count, setCount] = useState(0); + + return ( + <div className="flex justify-center"> + <button + className="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors" + onClick={() => setCount(count + 1)} + > + Clicked {count} times + </button> + </div> + ); +} |
