next-helios-fe 1.3.1 → 1.3.2
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,6 +6,7 @@ export interface FileProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
|
6
6
|
options?: {
|
|
7
7
|
variant?: "default" | "drag&drop";
|
|
8
8
|
maxSizeInMb?: number;
|
|
9
|
+
buttonOnly?: boolean;
|
|
9
10
|
width?: "full" | "fit";
|
|
10
11
|
height?: "short" | "medium" | "high";
|
|
11
12
|
};
|
|
@@ -71,7 +72,11 @@ export const File: React.FC<FileProps> = ({
|
|
|
71
72
|
)}
|
|
72
73
|
<div className="flex flex-row-reverse items-center gap-4">
|
|
73
74
|
{options?.variant !== "drag&drop" ? (
|
|
74
|
-
<div
|
|
75
|
+
<div
|
|
76
|
+
className={`relative flex-1 items-center ${
|
|
77
|
+
options?.buttonOnly ? "hidden" : "flex"
|
|
78
|
+
}`}
|
|
79
|
+
>
|
|
75
80
|
<input
|
|
76
81
|
type="file"
|
|
77
82
|
className={`peer/file w-full px-4 border-default border rounded-md bg-secondary-bg text-transparent file:hidden focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400 ${height}`}
|