HelpModal.tsx 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. import Link from "next/link";
  2. export default function HelpModal({
  3. helpvisible,
  4. helponClose,
  5. }: {
  6. helpvisible: boolean;
  7. helponClose: () => void;
  8. }) {
  9. // 如果不显示,直接 return null
  10. if (!helpvisible) return null;
  11. return (
  12. <div className="fixed inset-0 z-51 bg-black/50">
  13. {/* 弹框主体 - 从底部滑上来 */}
  14. <div className="absolute bottom-0 rounded-none left-0 right-0 w-full h-full bg-white overflow-auto">
  15. <div className="flex flex-col">
  16. {/* 顶部导航 */}
  17. <header className="bg-black text-white py-4 px-4 flex items-center">
  18. <button onClick={helponClose} className="mr-4">
  19. <svg
  20. xmlns="http://www.w3.org/2000/svg"
  21. className="h-6 w-6"
  22. fill="none"
  23. viewBox="0 0 24 24"
  24. stroke="currentColor"
  25. >
  26. <path
  27. strokeLinecap="round"
  28. strokeLinejoin="round"
  29. strokeWidth={2}
  30. d="M15 19l-7-7 7-7"
  31. />
  32. </svg>
  33. </button>
  34. <h1 className="text-lg font-medium">HELP & SUPPORT</h1>
  35. </header>
  36. {/* 菜单列表 */}
  37. <div className="px-4 py-2">
  38. {/* Information */}
  39. <Link
  40. href={"/help-faqs"}
  41. className="py-4 border-b border-gray-100 flex justify-between items-center"
  42. >
  43. {/* <div > */}
  44. <span className="text-black font-medium">Help & FAQ</span>
  45. <svg
  46. xmlns="http://www.w3.org/2000/svg"
  47. className="h-5 w-5 text-gray-400"
  48. fill="none"
  49. viewBox="0 0 24 24"
  50. stroke="currentColor"
  51. >
  52. <path
  53. strokeLinecap="round"
  54. strokeLinejoin="round"
  55. strokeWidth={2}
  56. d="M9 5l7 7-7 7"
  57. />
  58. </svg>
  59. {/* </div> */}
  60. </Link>
  61. {/* Address */}
  62. <Link
  63. href={"/track_order"}
  64. className="py-4 border-b border-gray-100 flex justify-between items-center"
  65. >
  66. {/* <div > */}
  67. <span className="text-black font-medium">Track Order</span>
  68. <svg
  69. xmlns="http://www.w3.org/2000/svg"
  70. className="h-5 w-5 text-gray-400"
  71. fill="none"
  72. viewBox="0 0 24 24"
  73. stroke="currentColor"
  74. >
  75. <path
  76. strokeLinecap="round"
  77. strokeLinejoin="round"
  78. strokeWidth={2}
  79. d="M9 5l7 7-7 7"
  80. />
  81. </svg>
  82. {/* </div> */}
  83. </Link>
  84. {/* help & Support */}
  85. <Link
  86. href={"/hair-care-tips"}
  87. className="py-4 border-b border-gray-100 flex justify-between items-center"
  88. >
  89. {/* <div > */}
  90. <span className="text-black font-medium">Hair Care Tips</span>
  91. <svg
  92. xmlns="http://www.w3.org/2000/svg"
  93. className="h-5 w-5 text-gray-400"
  94. fill="none"
  95. viewBox="0 0 24 24"
  96. stroke="currentColor"
  97. >
  98. <path
  99. strokeLinecap="round"
  100. strokeLinejoin="round"
  101. strokeWidth={2}
  102. d="M9 5l7 7-7 7"
  103. />
  104. </svg>
  105. {/* </div> */}
  106. </Link>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. );
  112. }