ywana-core8 0.0.328 → 0.0.329

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.328",
3
+ "version": "0.0.329",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -10,15 +10,17 @@ import './dialog.css'
10
10
  */
11
11
  export const Dialog = (props) => {
12
12
  const site = useContext(SiteContext)
13
- const { icon, title = "Dialog", children, onAction, actions, className } = props
13
+ const { icon, title = "Dialog", children, onAction, actions, className, eventPropagation = false } = props
14
14
 
15
15
  function close() {
16
16
  site.closeDialog()
17
17
  }
18
18
 
19
19
  function prevent(e) {
20
- e.preventDefault()
21
- e.stopPropagation()
20
+ if (!eventPropagation) {
21
+ e.preventDefault()
22
+ e.stopPropagation()
23
+ }
22
24
  }
23
25
 
24
26
  return (
@@ -29,7 +29,7 @@ export const UploadDialog = ({ label, target, accept, onSuccess, onClose }) => {
29
29
 
30
30
  const title = <Text use="headline6">{label}</Text>
31
31
  return (
32
- <Dialog title={title} open={true} onAction={onAction} actions={actions}>
32
+ <Dialog title={title} open={true} onAction={onAction} actions={actions} eventPropagation={true}>
33
33
  <Uploader label={label} accept={accept} target={target} onComplete={onComplete} />
34
34
  </Dialog>
35
35
  )