add: some styles and more organization

This commit is contained in:
2024-02-29 12:54:28 +01:00
parent 70ccf24c6b
commit eca5d60fd6
14 changed files with 709 additions and 469 deletions
+13
View File
@@ -0,0 +1,13 @@
import { useState } from 'preact/hooks'
export const Counter = ({}) => {
const [count, setCount] = useState(0)
return (
<div class="counter">
<button onClick={() => setCount(value => value - 1)}>-</button>
<div class="value">{count}</div>
<button onClick={() => setCount(value => value + 1)}>+</button>
</div>
)
}