react-landing-page
Version:
[](https://hermanya.github.io/react-landing-page/)
61 lines (49 loc) • 1.97 kB
JavaScript
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _rebass = require('rebass');
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var Feature = function Feature(_ref) {
var icon = _ref.icon,
description = _ref.description,
children = _ref.children,
props = _objectWithoutProperties(_ref, ['icon', 'description', 'children']);
return _react2.default.createElement(
_rebass.Box,
_extends({ width: [1 / 2, 1 / 3, 1 / 4, 1 / 5], my: [1, 2, 3], p: 3 }, props),
_react2.default.createElement(
_rebass.Heading,
{ textAlign: 'center', mb: 3, fontSize: 5 },
icon
),
typeof children === 'string' ? _react2.default.createElement(
_rebass.Lead,
{ textAlign: 'center', fontWeight: 'bold', m: 3 },
children
) : children,
_react2.default.createElement(
_rebass.Text,
{ textAlign: 'center', style: { opacity: 3 / 4 } },
description
)
);
};
Feature.displayName = 'Feature';
Feature.defaultProps = {
icon: '🔥',
children: 'Feature',
description: 'description'
};
Feature.propTypes = {
icon: _propTypes2.default.any,
description: _propTypes2.default.string,
children: _propTypes2.default.any
};
exports.default = Feature;