diff --git a/ShadowEditor.UI/src/index.js b/ShadowEditor.UI/src/index.js index 33606617..cf8953fe 100644 --- a/ShadowEditor.UI/src/index.js +++ b/ShadowEditor.UI/src/index.js @@ -41,6 +41,11 @@ export { default as PropertyGrid } from './property/PropertyGrid.jsx'; // table export { default as DataGrid } from './table/DataGrid.jsx'; +export { default as Table } from './table/Table.jsx'; +export { default as TableBody } from './table/TableBody.jsx'; +export { default as TableCell } from './table/TableCell.jsx'; +export { default as TableHead } from './table/TableHead.jsx'; +export { default as TableRow } from './table/TableRow.jsx'; // timeline export { default as Timeline } from './timeline/Timeline.jsx'; diff --git a/ShadowEditor.UI/src/table/Table.jsx b/ShadowEditor.UI/src/table/Table.jsx index e69de29b..b9e164b1 100644 --- a/ShadowEditor.UI/src/table/Table.jsx +++ b/ShadowEditor.UI/src/table/Table.jsx @@ -0,0 +1,34 @@ +import './css/Table.css'; +import classNames from 'classnames/bind'; +import PropTypes from 'prop-types'; + +/** + * 表格 + * @author tengge / https://github.com/tengge1 + */ +class Table extends React.Component { + render() { + const { className, style, children, ...others } = this.props; + + return + {children} +
; + } +} + +Table.propTypes = { + className: PropTypes.string, + style: PropTypes.object, + children: PropTypes.node, +}; + +Table.defaultProps = { + className: null, + style: null, + children: null, +}; + +export default Table; \ No newline at end of file diff --git a/ShadowEditor.UI/src/table/TableBody.jsx b/ShadowEditor.UI/src/table/TableBody.jsx index e69de29b..97ae9021 100644 --- a/ShadowEditor.UI/src/table/TableBody.jsx +++ b/ShadowEditor.UI/src/table/TableBody.jsx @@ -0,0 +1,34 @@ +import './css/TableBody.css'; +import classNames from 'classnames/bind'; +import PropTypes from 'prop-types'; + +/** + * 表格内容 + * @author tengge / https://github.com/tengge1 + */ +class TableBody extends React.Component { + render() { + const { className, style, children, ...others } = this.props; + + return + {children} + ; + } +} + +TableBody.propTypes = { + className: PropTypes.string, + style: PropTypes.object, + children: PropTypes.node, +}; + +TableBody.defaultProps = { + className: null, + style: null, + children: null, +}; + +export default TableBody; \ No newline at end of file diff --git a/ShadowEditor.UI/src/table/TableCell.jsx b/ShadowEditor.UI/src/table/TableCell.jsx index e69de29b..0f1f351f 100644 --- a/ShadowEditor.UI/src/table/TableCell.jsx +++ b/ShadowEditor.UI/src/table/TableCell.jsx @@ -0,0 +1,34 @@ +import './css/TableCell.css'; +import classNames from 'classnames/bind'; +import PropTypes from 'prop-types'; + +/** + * 表格单元格 + * @author tengge / https://github.com/tengge1 + */ +class TableCell extends React.Component { + render() { + const { className, style, children, ...others } = this.props; + + return + {children} + ; + } +} + +TableCell.propTypes = { + className: PropTypes.string, + style: PropTypes.object, + children: PropTypes.node, +}; + +TableCell.defaultProps = { + className: null, + style: null, + children: null, +}; + +export default TableCell; \ No newline at end of file diff --git a/ShadowEditor.UI/src/table/TableHead.jsx b/ShadowEditor.UI/src/table/TableHead.jsx index e69de29b..434e6f0e 100644 --- a/ShadowEditor.UI/src/table/TableHead.jsx +++ b/ShadowEditor.UI/src/table/TableHead.jsx @@ -0,0 +1,34 @@ +import './css/TableHead.css'; +import classNames from 'classnames/bind'; +import PropTypes from 'prop-types'; + +/** + * 表格头部 + * @author tengge / https://github.com/tengge1 + */ +class TableHead extends React.Component { + render() { + const { className, style, children, ...others } = this.props; + + return + {children} + ; + } +} + +TableHead.propTypes = { + className: PropTypes.string, + style: PropTypes.object, + children: PropTypes.node, +}; + +TableHead.defaultProps = { + className: null, + style: null, + children: null, +}; + +export default TableHead; \ No newline at end of file diff --git a/ShadowEditor.UI/src/table/TableRow.jsx b/ShadowEditor.UI/src/table/TableRow.jsx index e69de29b..d30ed4e8 100644 --- a/ShadowEditor.UI/src/table/TableRow.jsx +++ b/ShadowEditor.UI/src/table/TableRow.jsx @@ -0,0 +1,34 @@ +import './css/TableRow.css'; +import classNames from 'classnames/bind'; +import PropTypes from 'prop-types'; + +/** + * 表格行 + * @author tengge / https://github.com/tengge1 + */ +class TableRow extends React.Component { + render() { + const { className, style, children, ...others } = this.props; + + return + {children} + ; + } +} + +TableRow.propTypes = { + className: PropTypes.string, + style: PropTypes.object, + children: PropTypes.node, +}; + +TableRow.defaultProps = { + className: null, + style: null, + children: null, +}; + +export default TableRow; \ No newline at end of file diff --git a/ShadowEditor.UI/src/table/css/Table.css b/ShadowEditor.UI/src/table/css/Table.css new file mode 100644 index 00000000..e69de29b diff --git a/ShadowEditor.UI/src/table/css/TableBody.css b/ShadowEditor.UI/src/table/css/TableBody.css new file mode 100644 index 00000000..e69de29b diff --git a/ShadowEditor.UI/src/table/css/TableCell.css b/ShadowEditor.UI/src/table/css/TableCell.css new file mode 100644 index 00000000..e69de29b diff --git a/ShadowEditor.UI/src/table/css/TableHead.css b/ShadowEditor.UI/src/table/css/TableHead.css new file mode 100644 index 00000000..e69de29b diff --git a/ShadowEditor.UI/src/table/css/TableRow.css b/ShadowEditor.UI/src/table/css/TableRow.css new file mode 100644 index 00000000..e69de29b