暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Bills.js 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { useState } from "react";
  2. function Bills() {
  3. const [open, setOpen] = useState("a1");
  4. return (
  5. <>
  6. <div className="bills-widget">
  7. <div className={`${
  8. open === "a1"
  9. ? "bills-widget-content d-flex justify-content-between align-items-center active"
  10. : "bills-widget-content d-flex justify-content-between align-items-center"
  11. }`}
  12. onMouseOver={() => setOpen("a1")}>
  13. <div>
  14. <p>Netflix</p>
  15. <h4>$17.00</h4>
  16. </div>
  17. <div>
  18. <a href="#" className="btn btn-primary">
  19. Pay Now
  20. </a>
  21. </div>
  22. </div>
  23. <div className={`${
  24. open === "a2"
  25. ? "bills-widget-content d-flex justify-content-between align-items-center active"
  26. : "bills-widget-content d-flex justify-content-between align-items-center"
  27. }`}
  28. onMouseOver={() => setOpen("a2")}>
  29. <div>
  30. <p className="text-danger">Spotify</p>
  31. <h4>$11.00</h4>
  32. </div>
  33. <div>
  34. <a href="#" className="btn btn-primary">
  35. Pay Now
  36. </a>
  37. </div>
  38. </div>
  39. <div className={`${
  40. open === "a3"
  41. ? "bills-widget-content d-flex justify-content-between align-items-center active"
  42. : "bills-widget-content d-flex justify-content-between align-items-center"
  43. }`}
  44. onMouseOver={() => setOpen("a3")}>
  45. <div>
  46. <p className="text-danger">Spotify</p>
  47. <h4>$11.00</h4>
  48. </div>
  49. <div>
  50. <a href="#" className="btn btn-primary">
  51. Pay Now
  52. </a>
  53. </div>
  54. </div>
  55. </div>
  56. </>
  57. );
  58. }
  59. export default Bills;