Vulcan/packages/vulcan-ui-bootstrap/lib/components/forms/FormItem.jsx

19 lines
374 B
React
Raw Normal View History

2019-01-24 18:01:53 +09:00
/*
Layout for a single form item
*/
import React from 'react';
2019-01-26 21:21:09 +09:00
import Form from 'react-bootstrap/lib/Form';
2019-01-24 18:01:53 +09:00
import { registerComponent } from 'meteor/vulcan:core';
const FormItem = ({ path, label, children }) => (
<Form.Group controlId={path}>
2019-01-26 21:21:09 +09:00
{label && <Form.Label>{label}</Form.Label>}
2019-01-24 18:01:53 +09:00
{children}
</Form.Group>
);
registerComponent('FormItem', FormItem);