You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
703 B
React
27 lines
703 B
React
4 years ago
|
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,
|
||
|
};
|