mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
add ui
This commit is contained in:
1 parent
777a4bc927
commit
9c45527522
396 files changed
+13772
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import SplitPaneFillOverlay from 'vj/components/react-splitpane/SplitPaneFillOverlayComponent';
|
||||
|
||||
export default function PanelComponent(props) {
|
||||
const {
|
||||
title,
|
||||
className,
|
||||
children,
|
||||
...rest
|
||||
} = props;
|
||||
const cn = classNames(className, 'flex-col');
|
||||
return (
|
||||
<SplitPaneFillOverlay {...rest} className={cn}>
|
||||
<div className="scratchpad__panel-title">{title}</div>
|
||||
<div className="flex-col flex-fill">{children}</div>
|
||||
</SplitPaneFillOverlay>
|
||||
);
|
||||
}
|
||||
|
||||
PanelComponent.propTypes = {
|
||||
title: PropTypes.node,
|
||||
className: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
};
|
||||
Reference in new issue
Block a user