import { useState } from 'react';
import { Button, useToggle } from 'my-react-lib';
import './App.css';

function App() {
  const [count, setCount] = useState(0);
  const result = useToggle();

  return (
    <>
      <Button onClick={() => setCount((count) => count + 1)}>
        count is {count}
      </Button>
      <hr />
      Value: {result.value ? 'True' : 'False'}
      <br />
      <Button onClick={result.toggle}>Toggle</Button>
      <Button onClick={result.setTrue}>Set True</Button>
      <Button onClick={result.setFalse}>Set False</Button>
    </>
  );
}

export default App;

