(function (global, factory) {
    if (typeof define === "function" && define.amd) {
        define(['exports', 'react', 'styled-components', './Label'], factory);
    } else if (typeof exports !== "undefined") {
        factory(exports, require('react'), require('styled-components'), require('./Label'));
    } else {
        var mod = {
            exports: {}
        };
        factory(mod.exports, global.react, global.styledComponents, global.Label);
        global.FormField = mod.exports;
    }
})(this, function (exports, _react, _styledComponents, _Label) {
    'use strict';

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

    var _react2 = _interopRequireDefault(_react);

    var _styledComponents2 = _interopRequireDefault(_styledComponents);

    var _Label2 = _interopRequireDefault(_Label);

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

    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']);

    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
        );
    };
});