fix pyi
This commit is contained in:
parent
f754b85c8d
commit
67b8eb9b15
@ -286,6 +286,14 @@ class Upload(MemoizationLeaf):
|
|||||||
format.to_camel_case(key): value for key, value in upload_props.items()
|
format.to_camel_case(key): value for key, value in upload_props.items()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use_dropzone_arguements = {
|
||||||
|
"onDrop": event_var,
|
||||||
|
**upload_props,
|
||||||
|
}
|
||||||
|
|
||||||
|
left_side = f"const {{getRootProps: {root_props_unique_name}, getInputProps: {input_props_unique_name}}} "
|
||||||
|
right_side = f"useDropzone({str(Var.create(use_dropzone_arguements))})"
|
||||||
|
|
||||||
var_data = VarData.merge(
|
var_data = VarData.merge(
|
||||||
VarData(
|
VarData(
|
||||||
imports=Imports.EVENTS,
|
imports=Imports.EVENTS,
|
||||||
@ -297,12 +305,7 @@ class Upload(MemoizationLeaf):
|
|||||||
VarData(
|
VarData(
|
||||||
hooks={
|
hooks={
|
||||||
callback_str: None,
|
callback_str: None,
|
||||||
f"const {{getRootProps: {root_props_unique_name}, getInputProps: {input_props_unique_name}}} = useDropzone({
|
f"{left_side} = {right_side};": None,
|
||||||
str(Var.create({
|
|
||||||
'onDrop': event_var,
|
|
||||||
**upload_props,
|
|
||||||
}))
|
|
||||||
});": None,
|
|
||||||
},
|
},
|
||||||
imports={
|
imports={
|
||||||
"react-dropzone": "useDropzone",
|
"react-dropzone": "useDropzone",
|
||||||
|
Loading…
Reference in New Issue
Block a user