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

12 lines
446 B
React
Raw Normal View History

import React from 'react';
2019-01-24 18:01:53 +09:00
import { Form } from 'react-bootstrap';
import { Components, registerComponent } from 'meteor/vulcan:core';
2019-01-24 18:01:53 +09:00
const CheckboxComponent = ({ refFunction, path, inputProperties }) => (
<Components.FormItem {...inputProperties}>
<Form.Check {...inputProperties} id={path} ref={refFunction} checked={!!inputProperties.value}/>
</Components.FormItem>
);
registerComponent('FormComponentCheckbox', CheckboxComponent);