www: update button color in counter example

This commit is contained in:
Luca Casonato
2022-04-23 20:44:41 +02:00
parent 7d1aec4bce
commit 2449ac4024
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ export function RoundedButton(props: h.JSX.HTMLAttributes<HTMLButtonElement>) {
<button <button
{...props} {...props}
class={tw class={tw
`p-3 border border-transparent rounded-full text-white bg-indigo(600 hover:700) focus:(outline-none ring(2 offset-2 indigo-500)) disabled:(bg-indigo-200 cursor-default)`} `p-3 border border-transparent rounded-full text-white bg-green(500 hover:600) focus:(outline-none ring(2 offset-2 green-500)) disabled:(bg-green-200 cursor-default)`}
/> />
); );
} }
+1 -1
View File
@@ -17,7 +17,7 @@ export default function Counter(props: CounterProps) {
<RoundedButton <RoundedButton
title="Subtract 1" title="Subtract 1"
onClick={() => setCount(count - 1)} onClick={() => setCount(count - 1)}
disabled={!IS_BROWSER} disabled={!IS_BROWSER || count <= 0}
> >
<IconMinus /> <IconMinus />
</RoundedButton> </RoundedButton>