|
| 1 | +export function ModalCustomAnimation() { |
| 2 | + return ( |
| 3 | + <> |
| 4 | + <button |
| 5 | + data-dialog-target="animated-modal" |
| 6 | + 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 ml-2" type="button"> |
| 7 | + Open Animation Modal |
| 8 | + </button> |
| 9 | + <div |
| 10 | + data-dialog-backdrop="animated-modal" |
| 11 | + data-dialog-backdrop-close="true" |
| 12 | + 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" |
| 13 | + > |
| 14 | + <div |
| 15 | + data-dialog="animated-modal" |
| 16 | + data-dialog-mount="opacity-100 translate-y-0 scale-100" |
| 17 | + data-dialog-unmount="opacity-0 -translate-y-28 scale-90 pointer-events-none" |
| 18 | + data-dialog-transition="transition-all duration-300" |
| 19 | + className="relative m-4 p-4 w-2/5 min-w-[40%] max-w-[40%] rounded-lg bg-white shadow-sm" |
| 20 | + > |
| 21 | + <div className="flex shrink-0 items-center pb-4 text-xl font-medium text-slate-800"> |
| 22 | + Custom Animation Modal |
| 23 | + </div> |
| 24 | + <div className="relative border-t border-slate-200 py-4 leading-normal text-slate-600 font-light"> |
| 25 | + The key to more success is to have a lot of pillows. Put it this |
| 26 | + way, it took me twenty five years to get these plants, twenty five |
| 27 | + years of blood sweat and tears, and I'm never giving up, |
| 28 | + I'm just getting started. I'm up to something. Fan luv. |
| 29 | + </div> |
| 30 | + <div className="flex shrink-0 flex-wrap items-center pt-4 justify-end"> |
| 31 | + <button data-dialog-close="true" className="rounded-md border border-transparent py-2 px-4 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"> |
| 32 | + Cancel |
| 33 | + </button> |
| 34 | + <button data-dialog-close="true" className="rounded-md bg-green-600 py-2 px-4 border border-transparent text-center text-sm text-white transition-all shadow-md hover:shadow-lg focus:bg-green-700 focus:shadow-none active:bg-green-700 hover:bg-green-700 active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none ml-2" type="button"> |
| 35 | + Confirm |
| 36 | + </button> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + </> |
| 41 | + ); |
| 42 | +} |
0 commit comments