File tree Expand file tree Collapse file tree
packages/pluggable-widgets-tools/src/typings-generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const imageNativeOutput = `export interface MyWidgetProps<Style> {
3232 style: Style[];
3333 image: DynamicValue<NativeImage>;
3434 image2?: DynamicValue<NativeImage>;
35- image3: EditableImageValue <NativeImage>;
35+ image3: DynamicValue <NativeImage>;
3636 description: EditableValue<string>;
3737 action?: ActionValue;
3838}` ;
Original file line number Diff line number Diff line change @@ -130,11 +130,8 @@ function toClientPropType(
130130 return "Big" ;
131131 case "icon" :
132132 return isNative ? "DynamicValue<NativeIcon>" : "DynamicValue<WebIcon>" ;
133- case "image" : {
134- const allowUpload = prop . $ . allowUpload === "true" ;
135- const imageType = isNative ? "NativeImage" : "WebImage" ;
136- return allowUpload ? `EditableImageValue<${ imageType } >` : `DynamicValue<${ imageType } >` ;
137- }
133+ case "image" :
134+ return isNative ? "DynamicValue<NativeImage>" : prop . $ . allowUpload === "true" ? "EditableImageValue<WebImage>" : "DynamicValue<WebImage>" ;
138135 case "file" :
139136 return prop . $ . allowUpload ? "EditableFileValue<FileValue>" : "DynamicValue<FileValue>" ;
140137 case "datasource" :
You can’t perform that action at this time.
0 commit comments