import React from "react";
import "./Example.css";

export function Example() {
  const onSubmit = (e: React.FormEvent<HTMLFormElement>) => {
    e.preventDefault();

    alert("Discount applied!");
  };

  return (
    <div className="container">
      <h3>Rewards program</h3>
      <form onSubmit={onSubmit} className="content">
        <label htmlFor="phone">{"Enter the customer's phone number"}</label>
        <input name="phone" placeholder="(99) 99999-9999" className="input" />
        <button className="button" type="submit">
          Apply
        </button>
      </form>
    </div>
  );
}
