Rev 3628 | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react';
import { Form, FormButton, FormInput, FormSelect } from '../form';
export const reasons = [
{
label: 'Contenido sexual',
value: 's'
},
{
label: 'Contenido ofensivo',
value: 'o'
},
{
label: 'Discriminación',
value: 'd'
},
{
label: 'Adicciones',
value: 'a'
},
{
label: 'Terrorismo',
value: 't'
},
{
label: 'Otro',
value: 'ot'
}
];
export const block_options = [
{
label: 'Sí',
value: 'y'
},
{
label: 'No',
value: 'n'
}
];
export const ReportModal = ({ onSubmit }) => {
return (
<Form onSubmit={onSubmit} reset defaultValues={{ reason: '', block_user: '', comment: '' }}>
<FormSelect
label='Motivo'
name='reason'
placeholder='Seleccione un motivo'
rules={{ required: 'Por favor, seleccione un motivo' }}
options={reasons}
/>
<FormSelect
name='block_user'
label='Bloquear a este usuario'
options={block_options}
placeholder='Seleccione un opción'
rules={{ required: 'Por favor, seleccione una opción' }}
/>
<FormInput label='Comentario' name='comment' placeholder='(Opcional)' />
<FormButton type='submit'>Reportar</FormButton>
</Form>
);
};