import { Variable, bind } from "astal";

export function MyButton(): JSX.Element {
  const count = Variable(0);

  function increment() {
    count.set(count.get() + 1);
  }

  return (
    <button onClicked={increment}>
      <label label={bind(count).as((num) => `Count: ${num}`)} />
    </button>
  );
}
