diff options
| author | Yuval Adam <_@yuv.al> | 2025-06-15 13:44:39 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2025-06-15 13:44:39 +0200 |
| commit | dd100d4c821aae71f4a43b10843c74f14480bbc0 (patch) | |
| tree | 6739853a863b26d0a5896796efeb43e27b219586 /src/components/Counter.jsx | |
| parent | 2e0755cc68e14bda95abe9472754ae5f4e760a04 (diff) | |
| parent | abee8fa7e82e66765ca8b513f9dc1a7bac814779 (diff) | |
Merge remote-tracking branch 'v2/main'
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> + ); +} |
