'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

var _templateObject = _taggedTemplateLiteral(['\n    margin-bottom: 1.3rem;\n    &:last-child {\n        margin-bottom: 2.6rem;\n    }\n'], ['\n    margin-bottom: 1.3rem;\n    &:last-child {\n        margin-bottom: 2.6rem;\n    }\n']);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _Label = require('./Label');

var _Label2 = _interopRequireDefault(_Label);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var FormField = _styledComponents2.default.div(_templateObject);
FormField.displayName = 'FormField';

exports.default = function (_ref) {
    var label = _ref.label,
        htmlFor = _ref.htmlFor,
        children = _ref.children;
    return _react2.default.createElement(
        FormField,
        null,
        label && _react2.default.createElement(
            _Label2.default,
            { htmlFor: htmlFor },
            label
        ),
        children
    );
};