Rev 3639 |
Ir a la última revisión |
|
Comparar con el anterior |
Ultima modificación |
Ver Log
|
| Rev |
Autor |
Línea Nro. |
Línea |
| 3719 |
stevensc |
1 |
import React from 'react';
|
|
|
2 |
import { Form, FormButton, FormFilePicker } from '../form';
|
|
|
3 |
|
|
|
4 |
export const FileModal = ({ onSubmit, type = 'all', multiple = false }) => {
|
|
|
5 |
const handleSubmit = (data) => {
|
|
|
6 |
onSubmit(data.file);
|
|
|
7 |
};
|
|
|
8 |
|
|
|
9 |
return (
|
|
|
10 |
<Form defaultValues={{ file: null }} onSubmit={handleSubmit}>
|
|
|
11 |
<FormFilePicker name='file' type={type} multiple={multiple} />
|
|
|
12 |
<FormButton type='submit'>Guardar</FormButton>
|
|
|
13 |
</Form>
|
|
|
14 |
);
|
|
|
15 |
};
|