wix-style-react
Version:
48 lines (37 loc) • 2.05 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
import React from 'react';
import PropTypes from 'prop-types';
import Text from '../../Text';
var ExtraText = /*#__PURE__*/function (_React$PureComponent) {
_inherits(ExtraText, _React$PureComponent);
var _super = _createSuper(ExtraText);
function ExtraText() {
_classCallCheck(this, ExtraText);
return _super.apply(this, arguments);
}
_createClass(ExtraText, [{
key: "render",
value: function render() {
var _this$props = this.props,
dataHook = _this$props.dataHook,
text = _this$props.text;
return /*#__PURE__*/React.createElement(Text, {
secondary: true,
dataHook: dataHook
}, text);
}
}]);
return ExtraText;
}(React.PureComponent);
_defineProperty(ExtraText, "propTypes", {
dataHook: PropTypes.string,
text: PropTypes.string.isRequired
});
export default ExtraText;