diff --git a/comps/form/field/type/TypeUpload.tsx b/comps/form/field/type/TypeUpload.tsx index 6122ef6..82179ce 100755 --- a/comps/form/field/type/TypeUpload.tsx +++ b/comps/form/field/type/TypeUpload.tsx @@ -119,21 +119,36 @@ export const FieldUpload: FC<{ input.ref.value = null; } }; + + if (isEditor) input.fase = "start"; + return (
{input.fase === "start" ? ( <> -
- (input.ref = ref)} - type="file" - multiple={false} - onChange={on_upload} - className={cx( - "c-absolute c-w-full c-h-full c-cursor-pointer c-top-0 c-left-0 c-opacity-0" - )} - /> - {styling === "inline" ? ( +
+ {!isEditor && ( + (input.ref = ref)} + type="file" + multiple={false} + onChange={on_upload} + className={cx( + "c-absolute c-w-full c-h-full c-cursor-pointer c-top-0 c-left-0 c-opacity-0" + )} + /> + )} + {styling !== "full" ? ( <>
{ @@ -148,7 +163,7 @@ export const FieldUpload: FC<{
- Upload Your File + Upload File
@@ -281,23 +296,25 @@ const Filename = ({ url }: { url: string }) => { const color = darkenColor(generateRandomColor(file.extension)); return ( <> -
- {file.extension} -
+ {file.extension && ( +
+ {file.extension} +
+ )}
{ ` )} > - Open in New Tab + View File in New Tab
);