1.0.5 • Published 7 months ago

simple-increment-decrement-counter v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Counter (Increment Decrement)

Authors

Demo

App Screenshot

Usage/Examples

import "./App.css";
import { Button, useCounter } from "simple-increment-decrement-counter";

function App() {
  const { count, Increment, Decrement } = useCounter();

  return (
    <div>
      <h1 style={{ fontFamily: "Lexend" }}>{count}</h1>
      <Button onClick={Increment}>
        <svg
          className="w-6 h-6 text-gray-800 dark:text-white"
          aria-hidden="true"
          xmlns="http://www.w3.org/2000/svg"
          width="24"
          height="24"
          fill="none"
          viewBox="0 0 24 24"
        >
          <path
            stroke="currentColor"
            stroke-linecap="round"
            stroke-linejoin="round"
            stroke-width="2"
            d="M5 12h14m-7 7V5"
          />
        </svg>
      </Button>
      <Button onClick={Decrement}>
        <svg
          className="w-6 h-6 text-gray-800 dark:text-white"
          aria-hidden="true"
          xmlns="http://www.w3.org/2000/svg"
          width="24"
          height="24"
          fill="none"
          viewBox="0 0 24 24"
        >
          <path
            stroke="currentColor"
            stroke-linecap="round"
            stroke-linejoin="round"
            stroke-width="2"
            d="M5 12h14"
          />
        </svg>
      </Button>
    </div>
  );
}

export default App;