@conduction/components 1.0.14 → 1.0.15
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.
|
@@ -10,3 +10,8 @@ export declare const InputText: React.FC<IInputProps & IReactHookFormProps>;
|
|
|
10
10
|
export declare const InputEmail: React.FC<IInputProps & IReactHookFormProps>;
|
|
11
11
|
export declare const InputDate: React.FC<IInputProps & IReactHookFormProps>;
|
|
12
12
|
export declare const InputNumber: React.FC<IInputProps & IReactHookFormProps>;
|
|
13
|
+
interface IInputFileProps {
|
|
14
|
+
accept?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const InputFile: React.FC<IInputFileProps & IInputProps & IReactHookFormProps>;
|
|
17
|
+
export {};
|
|
@@ -10,3 +10,4 @@ export const InputText = ({ disabled, name, defaultValue, validation, register,
|
|
|
10
10
|
export const InputEmail = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "email", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
11
11
|
export const InputDate = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "date", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
12
12
|
export const InputNumber = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "number", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
13
|
+
export const InputFile = ({ disabled, name, accept, defaultValue, validation, register, }) => (_jsx("input", { className: "denhaag-textfield__input", type: "file", ...{ defaultValue, disabled, accept }, ...register(name, { ...validation }) }));
|
package/package.json
CHANGED
|
@@ -92,3 +92,23 @@ export const InputNumber: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
92
92
|
invalid={errors[name]}
|
|
93
93
|
/>
|
|
94
94
|
);
|
|
95
|
+
|
|
96
|
+
interface IInputFileProps {
|
|
97
|
+
accept?: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const InputFile: React.FC<IInputFileProps & IInputProps & IReactHookFormProps> = ({
|
|
101
|
+
disabled,
|
|
102
|
+
name,
|
|
103
|
+
accept,
|
|
104
|
+
defaultValue,
|
|
105
|
+
validation,
|
|
106
|
+
register,
|
|
107
|
+
}) => (
|
|
108
|
+
<input
|
|
109
|
+
className="denhaag-textfield__input"
|
|
110
|
+
type="file"
|
|
111
|
+
{...{ defaultValue, disabled, accept }}
|
|
112
|
+
{...register(name, { ...validation })}
|
|
113
|
+
/>
|
|
114
|
+
);
|