UNPKG

2.06 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7var _templateObject = _taggedTemplateLiteral(['\n font-family: ', ';\n font-weight: 300;\n text-decoration: none;\n background: ', ';\n color: ', ';\n padding: 0 1rem;\n cursor: pointer;\n transition: all 0.2s ease-in;\n border-radius: 3px;\n box-shadow: 0px 2px 0px 0px rgba(0,0,0,0.20);\n display: inline-flex;\n align-items: center;\n height: 2.5rem;\n'], ['\n font-family: ', ';\n font-weight: 300;\n text-decoration: none;\n background: ', ';\n color: ', ';\n padding: 0 1rem;\n cursor: pointer;\n transition: all 0.2s ease-in;\n border-radius: 3px;\n box-shadow: 0px 2px 0px 0px rgba(0,0,0,0.20);\n display: inline-flex;\n align-items: center;\n height: 2.5rem;\n']);
8
9var _styledComponents = require('styled-components');
10
11var _styledComponents2 = _interopRequireDefault(_styledComponents);
12
13var _react = require('react');
14
15var _react2 = _interopRequireDefault(_react);
16
17function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
19function _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; }
20
21function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
22
23var StyledTag = _styledComponents2.default.span(_templateObject, function (props) {
24 return props.theme.font.base;
25}, function (props) {
26 return props.theme.colors.black;
27}, function (props) {
28 return props.theme.colors.white;
29});
30
31var Tag = function Tag(_ref) {
32 var children = _ref.children,
33 other = _objectWithoutProperties(_ref, ['children']);
34
35 return _react2.default.createElement(
36 StyledTag,
37 other,
38 _react2.default.createElement(
39 'span',
40 null,
41 children
42 )
43 );
44};
45
46Tag.propTypes = {
47 children: _react.PropTypes.string.isRequired
48};
49
50exports.default = Tag;
\No newline at end of file