|
| 1 | +export function ModalWithImage() { |
| 2 | + return ( |
| 3 | + <> |
| 4 | + <div |
| 5 | + className="relative flex h-64 w-96 cursor-pointer flex-col overflow-hidden rounded-lg bg-white bg-clip-border shadow-sm transition-opacity hover:opacity-90" |
| 6 | + data-dialog-target="image-modal" |
| 7 | + > |
| 8 | + <img |
| 9 | + alt="nature" |
| 10 | + className="h-full w-full object-cover object-center" |
| 11 | + src="https://images.unsplash.com/photo-1485470733090-0aae1788d5af?w=1300&q=80" |
| 12 | + /> |
| 13 | + </div> |
| 14 | + <div |
| 15 | + data-dialog-backdrop="image-modal" |
| 16 | + data-dialog-backdrop-close="true" |
| 17 | + className="pointer-events-none fixed inset-0 z-[999] grid h-screen w-screen place-items-center bg-black bg-opacity-60 opacity-0 backdrop-blur-sm transition-opacity duration-300" |
| 18 | + > |
| 19 | + <div |
| 20 | + className="relative m-4 w-2/4 rounded-lg bg-white shadow-sm" |
| 21 | + role="dialog" |
| 22 | + data-dialog="image-modal" |
| 23 | + > |
| 24 | + <div className="flex items-center justify-between p-4"> |
| 25 | + <div className="flex items-center gap-3"> |
| 26 | + <img |
| 27 | + alt="tania andrew" |
| 28 | + src="https://images.unsplash.com/photo-1633332755192-727a05c4013d?w=1300&q=80" |
| 29 | + className="relative inline-block h-9 w-9 rounded-full object-cover object-center" |
| 30 | + /> |
| 31 | + <div className="-mt-px flex flex-col"> |
| 32 | + <p className="text-sm text-slate-800 font-medium"> |
| 33 | + Tania Andrew |
| 34 | + </p> |
| 35 | + <p className="text-xs font-normal text-slate-500"> |
| 36 | + @andrew |
| 37 | + </p> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + <div className="flex items-center gap-2"> |
| 41 | + <button className="rounded-md border border-transparent p-2.5 text-center text-sm transition-all text-slate-600 hover:bg-slate-100 focus:bg-slate-100 active:bg-slate-100 disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none" type="button"> |
| 42 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className="w-4 h-4"> |
| 43 | + <path d="m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z" /> |
| 44 | + </svg> |
| 45 | + </button> |
| 46 | + <button className="rounded-md bg-slate-800 py-2 px-4 border border-transparent text-center text-sm text-white transition-all shadow-md hover:shadow-lg focus:bg-slate-700 focus:shadow-none active:bg-slate-700 hover:bg-slate-700 active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none" type="button"> |
| 47 | + Free Download |
| 48 | + </button> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + <div className="relative border-b border-t border-b-blue-gray-100 border-t-blue-gray-100 p-0 font-sans text-base font-light leading-relaxed text-blue-gray-500 antialiased"> |
| 52 | + <img |
| 53 | + alt="nature" |
| 54 | + className="h-[30rem] w-full object-cover object-center" |
| 55 | + src="https://images.unsplash.com/photo-1485470733090-0aae1788d5af?w=1300&q=80" |
| 56 | + /> |
| 57 | + </div> |
| 58 | + <div className="flex shrink-0 flex-wrap items-center justify-between p-4 text-blue-gray-500"> |
| 59 | + <div className="flex items-center gap-16"> |
| 60 | + <div> |
| 61 | + <p className="text-slate-500 text-sm"> |
| 62 | + Views |
| 63 | + </p> |
| 64 | + <p className="text-slate-800 font-medium"> |
| 65 | + 44,082,044 |
| 66 | + </p> |
| 67 | + </div> |
| 68 | + <div> |
| 69 | + <p className="text-slate-500 text-sm"> |
| 70 | + Downloads |
| 71 | + </p> |
| 72 | + <p className="text-slate-800 font-medium"> |
| 73 | + 553,031 |
| 74 | + </p> |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + <button className="flex items-center rounded-md border border-slate-300 py-2 px-4 text-center text-sm transition-all shadow-sm hover:shadow-lg text-slate-600 hover:text-white hover:bg-slate-800 hover:border-slate-800 focus:text-white focus:bg-slate-800 focus:border-slate-800 active:border-slate-800 active:text-white active:bg-slate-800 disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none" type="button"> |
| 78 | + <svg |
| 79 | + xmlns="http://www.w3.org/2000/svg" |
| 80 | + viewBox="0 0 24 24" |
| 81 | + fill="currentColor" |
| 82 | + aria-hidden="true" |
| 83 | + className="h-4 w-4 mr-1.5" |
| 84 | + > |
| 85 | + <path |
| 86 | + fill-rule="evenodd" |
| 87 | + d="M15.75 4.5a3 3 0 11.825 2.066l-8.421 4.679a3.002 3.002 0 010 1.51l8.421 4.679a3 3 0 11-.729 1.31l-8.421-4.678a3 3 0 110-4.132l8.421-4.679a3 3 0 01-.096-.755z" |
| 88 | + clip-rule="evenodd" |
| 89 | + ></path> |
| 90 | + </svg> |
| 91 | + Share |
| 92 | + </button> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + </> |
| 97 | + ); |
| 98 | +} |
0 commit comments