Formulario.jsx 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { Form, Input, Button, Row, Col } from 'antd'
  2. import PropTypes from 'prop-types'
  3. // const selectores = {
  4. // consejoElectoral: {
  5. // name: "v1/consejo-electoral",
  6. // },
  7. // }
  8. const Formulario = ({
  9. form,
  10. onFinish,
  11. }) => {
  12. return (
  13. <Form
  14. layout="vertical"
  15. name="basic"
  16. form={form}
  17. initialValues={{ remember: true }}
  18. onFinish={onFinish}
  19. onFinishFailed={() => { }}
  20. >
  21. <Row gutter={16}>
  22. <Col span={6}>
  23. <Form.Item
  24. label="Búsqueda"
  25. name="q"
  26. >
  27. <Input />
  28. </Form.Item>
  29. </Col>
  30. <Col span={6}>
  31. <Form.Item>
  32. <Button
  33. type="primary"
  34. htmlType="submit"
  35. style={{ marginTop: "30px" }}
  36. >
  37. Buscar
  38. </Button>
  39. </Form.Item>
  40. </Col>
  41. </Row>
  42. </Form>
  43. )
  44. }
  45. export default Formulario
  46. Formulario.propTypes = {
  47. form: PropTypes.object.isRequired,
  48. onFinish: PropTypes.func.isRequired,
  49. }