mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
VBoxLayout.jsx
This commit is contained in:
parent
6275ef60db
commit
6fe59cdc78
@ -17,6 +17,13 @@ body,
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
/* VBoxLayout */
|
||||
|
||||
.VBox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* Panel */
|
||||
|
||||
.Panel {
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
region: 'center',
|
||||
key: 3
|
||||
});
|
||||
var layout = React.createElement(Shadow.HBoxLayout, undefined, [
|
||||
var layout = React.createElement(Shadow.VBoxLayout, undefined, [
|
||||
panel1,
|
||||
panel2,
|
||||
panel3,
|
||||
|
||||
@ -3,6 +3,7 @@ export { default as Button } from './form/Button.jsx';
|
||||
|
||||
// layout
|
||||
export { default as HBoxLayout } from './layout/HBoxLayout.jsx';
|
||||
export { default as VBoxLayout } from './layout/VBoxLayout.jsx';
|
||||
|
||||
// panel
|
||||
export { default as Panel } from './panel/Panel.jsx';
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
import classNames from 'classnames/bind';
|
||||
|
||||
/**
|
||||
* 水平布局
|
||||
* @author tengge / https://github.com/tengge1
|
||||
* @property {String} className 样式类
|
||||
* @property {String} children 内容
|
||||
*/
|
||||
class HBoxLayout extends React.Component {
|
||||
render() {
|
||||
const { className, children } = this.props;
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
import classNames from 'classnames/bind';
|
||||
|
||||
/**
|
||||
* 竖直布局
|
||||
* @author tengge / https://github.com/tengge1
|
||||
* @property {String} className 样式类
|
||||
* @property {String} children 内容
|
||||
*/
|
||||
class VBoxLayout extends React.Component {
|
||||
render() {
|
||||
const { className, children } = this.props;
|
||||
|
||||
return <div className={classNames('VBox', className)}>{children}</div>;
|
||||
}
|
||||
}
|
||||
|
||||
export default VBoxLayout;
|
||||
@ -5,14 +5,13 @@ import classNames from 'classnames/bind';
|
||||
* @author tengge / https://github.com/tengge1
|
||||
* @property {String} title 标题
|
||||
* @property {String} className 样式类
|
||||
* @property {String} region 在BorderLayout中的位置,west, east, north, south
|
||||
* @property {String} children 内容
|
||||
*/
|
||||
class Panel extends React.Component {
|
||||
render() {
|
||||
const { title, className, region, children } = this.props;
|
||||
const { title, className, children } = this.props;
|
||||
|
||||
return <div className={classNames('Panel', region, className)}>
|
||||
return <div className={classNames('Panel', className)}>
|
||||
<div className="wrap">
|
||||
<div className="title">
|
||||
<div className="icon">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user