@mshafiqyajid/react-modal 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,3 +101,11 @@ Set `data-theme="dark"` on any ancestor element — no `prefers-color-scheme` qu
|
|
|
101
101
|
## License
|
|
102
102
|
|
|
103
103
|
MIT
|
|
104
|
+
|
|
105
|
+
## What's new in 0.3.0
|
|
106
|
+
|
|
107
|
+
- **Stacked modals** — depth-aware z-index + behind-scale-down effect. Open a second modal and the first scales/translates back automatically.
|
|
108
|
+
- **Transition variants** — `transition: "fade" | "zoom" | "slide-up" | "slide-down"` (default `"fade"`). Drawers keep their slide-from-edge transition.
|
|
109
|
+
- **`confirm()` programmatic utility** — `import { confirm } from "@mshafiqyajid/react-modal/styled"`. Self-mounts a one-off modal with `Cancel` / `Confirm` buttons (with `danger` variant). Returns `Promise<boolean>`.
|
|
110
|
+
- **Swipe-to-dismiss** — `swipeToDismiss?: boolean` (default `true` for `drawer-bottom`). Touch-drag down past 120 px to dismiss.
|
|
111
|
+
- **`closeOnSubmit?: boolean`** — when the modal contains a `<form>` and it submits successfully, auto-close (skipped if the consumer's onSubmit calls `e.preventDefault()`).
|
package/package.json
CHANGED