From d81dac901419ee9a0ceea05c06e107f12b1197d8 Mon Sep 17 00:00:00 2001 From: GH Pages Bot Date: Sun, 30 May 2021 09:47:46 -0500 Subject: [PATCH] Fixing draggable on mobile --- CHANGELOG.md | 4 + examples/package.json | 2 +- examples/src/App.js | 264 +++++++++++++++++++-------------------- package.json | 2 +- src/components/Dialog.js | 3 +- 5 files changed, 140 insertions(+), 135 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c7fd29..e916512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 The date format used is DD/MM/YYYY. +## [1.0.4] - 30/05/2021 +### Fixed +* Fixing draggable on mobile + ## [1.0.3] - 04/04/2021 ### Fixed * Removing overriding styles from body diff --git a/examples/package.json b/examples/package.json index f26a8ae..5aa0fc0 100644 --- a/examples/package.json +++ b/examples/package.json @@ -15,7 +15,7 @@ }, "homepage": "https://denkschuldt.github.io/react-dialog", "dependencies": { - "@denkschuldt/react-dialog": "^1.0.3", + "@denkschuldt/react-dialog": "^1.0.4", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", diff --git a/examples/src/App.js b/examples/src/App.js index 4ad1b0a..7cb438c 100644 --- a/examples/src/App.js +++ b/examples/src/App.js @@ -69,6 +69,138 @@ function App() { +
+

Props

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionDefault
widthNumberDialog width
heightNumberDialog height
titleStringDialog title
draggableBooleanAllows dialog dragtrue
classNameStringComponent class to override styles
slideInStringInitial animation: top, bottom, left, right
cancelableOutsideBooleanWhether the dialogs closes by clicking outside or notfalse
closeOnEscPressBooleanWhether the dialogs closes by pressing escapefalse
hideCloseButtonBooleanHides the close buttonfalse
onCloseClickfunction +

+
Close button click function
cancelTextStringNegative button text'CANCEL'
onCancelClickfunctionNegative button click function
cancelDisabledBooleanNegative button disabled propfalse
confirmTextStringPositive button text'OK'
onConfirmClickfunctionPositive button click function
confirmDisabledBooleanPositive button disabled propfalse
+
+

Usage

@@ -331,138 +463,6 @@ function App() {

-
-

Props

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeRequiredDescriptionDefault
widthNumberDialog width
heightNumberDialog height
titleStringDialog title
draggableBooleanAllows dialog dragtrue
classNameStringComponent class to override styles
slideInStringInitial animation: top, bottom, left, right
cancelableOutsideBooleanWhether the dialogs closes by clicking outside or notfalse
closeOnEscPressBooleanWhether the dialogs closes by pressing escapefalse
hideCloseButtonBooleanHides the close buttonfalse
onCloseClickfunction -

-
Close button click function
cancelTextStringNegative button text'CANCEL'
onCancelClickfunctionNegative button click function
cancelDisabledBooleanNegative button disabled propfalse
confirmTextStringPositive button text'OK'
onConfirmClickfunctionPositive button click function
confirmDisabledBooleanPositive button disabled propfalse
-
-

License

MIT

diff --git a/package.json b/package.json index 6b04922..beb5273 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@denkschuldt/react-dialog", - "version": "1.0.3", + "version": "1.0.4", "private": false, "description": "A simple to use and customizable react dialog implementation.", "main": "dist/index.js", diff --git a/src/components/Dialog.js b/src/components/Dialog.js index b8dbc77..5e2141d 100644 --- a/src/components/Dialog.js +++ b/src/components/Dialog.js @@ -52,7 +52,8 @@ const Dialog = (props) => { onClick={cancelableOutside ? handleCloseClick : undefined}>
+ disabled={!draggable} + cancel='.dnk-dialog-close, .dnk-dialog-body'>