Guest User

Untitled

a guest
Jan 2nd, 2025
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.99 KB | None | 0 0
  1. import Image from "next/image";
  2.  
  3. export default function ProfileTemplate({ userData, setIsEditing }) {
  4.  
  5. return (
  6. <>
  7. <div className="bg-white w-full justify-end flex flex-col gap-5 px-3 md:px-16 lg:px-28 md:flex-row text-[#161931]">
  8. <main className="w-full min-h-screen py-1 md:w-2/3 lg:w-3/4">
  9. <div className="p-2 md:p-4">
  10. <div className="w-full px-6 pb-8 mt-8 sm:max-w-xl sm:rounded-lg">
  11. <h2 className="pl-6 text-2xl font-bold sm:text-xl">Profile Information</h2>
  12.  
  13. <div className="grid max-w-2xl mx-auto mt-8">
  14. <div className="flex flex-col justify-center space-y-5 sm:flex-row sm:space-y-0">
  15. <Image
  16. className="object-cover w-40 h-40 p-1 rounded-full ring-2 ring-indigo-300 dark:ring-indigo-500"
  17. width={200}
  18. height={200}
  19. src={userData?.image}
  20. alt="Bordered avatar" />
  21. </div>
  22.  
  23. <div className="items-center mt-8 sm:mt-14 text-[#202142]">
  24.  
  25. <div
  26. className="flex flex-col items-center w-full mb-2 space-x-0 space-y-2 sm:flex-row sm:space-x-4 sm:space-y-0 sm:mb-6">
  27. <div className="w-full">
  28. <label htmlFor="first_name"
  29. className="block mb-2 text-sm font-medium text-indigo-900">
  30. Nickname</label>
  31. <input type="text" id="first_name"
  32. className="bg-indigo-50 border border-indigo-300 text-indigo-900 text-sm rounded-lg
  33. focus:ring-indigo-500 focus:border-indigo-500 block w-full p-2.5 opacity-60 hover:cursor-not-allowed"
  34. placeholder="Your first name"
  35. defaultValue={userData?.name}
  36. required
  37. disabled />
  38. </div>
  39.  
  40. </div>
  41.  
  42. <div className="mb-2 sm:mb-6">
  43. <label htmlFor="email"
  44. className="block mb-2 text-sm font-medium text-indigo-900">
  45. Email</label>
  46. <input type="email" id="email"
  47. className="bg-indigo-50 border border-indigo-300 text-indigo-900 text-sm rounded-lg
  48. focus:ring-indigo-500 focus:border-indigo-500 block w-full p-2.5 opacity-60 hover:cursor-not-allowed"
  49. placeholder="[email protected]"
  50. defaultValue={userData?.email}
  51. required
  52. disabled />
  53. </div>
  54.  
  55. <div className="mb-2 sm:mb-6">
  56. <label htmlFor="address"
  57. className="block mb-2 text-sm font-medium text-indigo-900">Address</label>
  58. <input type="text" id="address"
  59. className="bg-indigo-50 border border-indigo-300 text-indigo-900 text-sm rounded-lg
  60. focus:ring-indigo-500 focus:border-indigo-500 block w-full p-2.5 opacity-60 hover:cursor-not-allowed"
  61. placeholder="Your address"
  62. defaultValue={userData?.address}
  63. required
  64. disabled />
  65. </div>
  66.  
  67. <div className="mb-2 sm:mb-6">
  68. <label htmlFor="email"
  69. className="block mb-2 text-sm font-medium text-indigo-900">
  70. City</label>
  71. <input type="text" id="city"
  72. className="bg-indigo-50 border border-indigo-300 text-indigo-900 text-sm rounded-lg
  73. focus:ring-indigo-500 focus:border-indigo-500 block w-full p-2.5 opacity-60 hover:cursor-not-allowed"
  74. placeholder="Your city"
  75. defaultValue={userData?.city}
  76. required
  77. disabled />
  78. </div>
  79.  
  80. <div className="flex justify-end">
  81. <button onClick={() => setIsEditing(true)}
  82. className="text-white bg-indigo-700 hover:bg-indigo-800 focus:ring-4 focus:outline-none focus:ring-indigo-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800">Edit Information</button>
  83. </div>
  84.  
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </main>
  90. </div>
  91.  
  92. </>
  93. )
  94. }
Advertisement
Add Comment
Please, Sign In to add comment