From 3700ebc7f02a3f5e5e76c0827652dcd4bdfeac57 Mon Sep 17 00:00:00 2001 From: tengge1 <930372551@qq.com> Date: Sun, 26 May 2019 09:08:48 +0800 Subject: [PATCH] HBoxLayout --- ShadowEditor.UI/src/layout/HBoxLayout.jsx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ShadowEditor.UI/src/layout/HBoxLayout.jsx b/ShadowEditor.UI/src/layout/HBoxLayout.jsx index df636940..b97737a7 100644 --- a/ShadowEditor.UI/src/layout/HBoxLayout.jsx +++ b/ShadowEditor.UI/src/layout/HBoxLayout.jsx @@ -4,16 +4,28 @@ import classNames from 'classnames/bind'; /** * 水平布局 * @author tengge / https://github.com/tengge1 - * @property {String} className 样式类 - * @property {Object} style 样式 - * @property {String} children 内容 */ class HBoxLayout extends React.Component { render() { - const { className, style, children } = this.props; + const { className, style, children, ...others } = this.props; - return
{children}
; + return
{children}
; } } +HBoxLayout.propTypes = { + className: PropTypes.string, + style: PropTypes.object, + children: PropTypes.node, +}; + +HBoxLayout.defaultProps = { + className: null, + style: null, + children: null, +}; + export default HBoxLayout; \ No newline at end of file