ywana-core8 0.0.788 → 0.0.789
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/package.json
CHANGED
@@ -6,7 +6,7 @@ import { SiteContext, Dialog } from '../../site';
|
|
6
6
|
/**
|
7
7
|
* Upload Dialog
|
8
8
|
*/
|
9
|
-
export const UploadDialog = ({ label, target, accept, onSuccess, onComplete, onClose, children, className, disabled, overlayCanClose = true }) => {
|
9
|
+
export const UploadDialog = ({ label, target, accept, onSuccess, onComplete, onClose, children, className, disabled, onCanClose, overlayCanClose = true }) => {
|
10
10
|
|
11
11
|
const site = useContext(SiteContext);
|
12
12
|
|
@@ -25,9 +25,13 @@ export const UploadDialog = ({ label, target, accept, onSuccess, onComplete, onC
|
|
25
25
|
}
|
26
26
|
}
|
27
27
|
|
28
|
+
function canClose() {
|
29
|
+
return onCanClose ? onCanClose() : true
|
30
|
+
}
|
31
|
+
|
28
32
|
const actions = (
|
29
33
|
<Fragment>
|
30
|
-
<Button label="CERRAR" action={() => onAction("CLOSE")} />
|
34
|
+
<Button label="CERRAR" action={() => onAction("CLOSE")} disabled={canClose()} />
|
31
35
|
</Fragment>
|
32
36
|
)
|
33
37
|
|