@twreporter/react-components
Advanced tools
Comparing version 8.24.0-rc.3 to 8.24.0-rc.4
@@ -20,6 +20,2 @@ "use strict"; | ||
var _rwd = require("../../rwd"); | ||
var _sharedEnum = require("../../shared-enum"); | ||
var _color = require("@twreporter/core/lib/constants/color"); | ||
@@ -64,15 +60,9 @@ | ||
renderButton = _ref.renderButton; | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_rwd.DesktopAndAbove, null, /*#__PURE__*/_react["default"].createElement(BarContainer, null, /*#__PURE__*/_react["default"].createElement(Text, null, /*#__PURE__*/_react["default"].createElement(H5Gray800, { | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(BarContainer, null, /*#__PURE__*/_react["default"].createElement(Text, null, /*#__PURE__*/_react["default"].createElement(H5Gray800, { | ||
text: title | ||
}), subtitle ? /*#__PURE__*/_react["default"].createElement(P2Gray600, { | ||
text: subtitle | ||
}) : null), renderButton ? renderButton(_sharedEnum.Size.L) : null), /*#__PURE__*/_react["default"].createElement(DividerGray800, { | ||
}) : null), renderButton || null), /*#__PURE__*/_react["default"].createElement(DividerGray800, { | ||
direction: _divider["default"].Direction.HORIZONTAL | ||
})), /*#__PURE__*/_react["default"].createElement(_rwd.TabletAndBelow, null, /*#__PURE__*/_react["default"].createElement(BarContainer, null, /*#__PURE__*/_react["default"].createElement(Text, null, /*#__PURE__*/_react["default"].createElement(H5Gray800, { | ||
text: title | ||
}), subtitle ? /*#__PURE__*/_react["default"].createElement(P2Gray600, { | ||
text: subtitle | ||
}) : null), renderButton ? renderButton(_sharedEnum.Size.S) : null), /*#__PURE__*/_react["default"].createElement(DividerGray800, { | ||
direction: _divider["default"].Direction.HORIZONTAL | ||
}))); | ||
})); | ||
}; | ||
@@ -83,5 +73,5 @@ | ||
subtitle: _propTypes["default"].string, | ||
renderButton: _propTypes["default"].func | ||
renderButton: _propTypes["default"].element | ||
}; | ||
var _default = Title2; | ||
exports["default"] = _default; |
@@ -35,11 +35,8 @@ "use strict"; | ||
render: function render(args) { | ||
args.renderButton = args.showButton ? function (size) { | ||
return /*#__PURE__*/_react["default"].createElement(_textButton["default"], { | ||
text: "RWD \u6309\u9215", | ||
rightIconComponent: /*#__PURE__*/_react["default"].createElement(_icon.Arrow, { | ||
direction: "right" | ||
}), | ||
size: size | ||
}); | ||
} : null; | ||
args.renderButton = args.showButton ? /*#__PURE__*/_react["default"].createElement(_textButton["default"], { | ||
text: "NOT RWD \u6309\u9215", | ||
rightIconComponent: /*#__PURE__*/_react["default"].createElement(_icon.Arrow, { | ||
direction: "right" | ||
}) | ||
}) : null; | ||
return /*#__PURE__*/_react["default"].createElement(_title["default"], args); | ||
@@ -46,0 +43,0 @@ }, |
{ | ||
"name": "@twreporter/react-components", | ||
"version": "8.24.0-rc.3", | ||
"version": "8.24.0-rc.4", | ||
"main": "lib/index.js", | ||
@@ -54,3 +54,3 @@ "repository": "https://github.com/twreporter/twreporter-npm-packages.git", | ||
}, | ||
"gitHead": "fae9f717d3c7766dc48a538d5cf1f5c8d2d93f6d" | ||
"gitHead": "227a94192aa96387d4877dac35e544e2415e0e8e" | ||
} |
Sorry, the diff of this file is too big to display
680516
11204