mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-02-28 04:40:32 +00:00
38 lines
842 B
TypeScript
38 lines
842 B
TypeScript
import { Component, Fragment } from 'react';
|
|
import classNames from 'classnames';
|
|
import { observer } from '@ali/lowcode-globals';
|
|
import Area from './area';
|
|
import Panel from './panel';
|
|
|
|
@observer
|
|
export default class BottomArea extends Component<{ area: Area<any, Panel> }> {
|
|
shouldComponentUpdate() {
|
|
return false;
|
|
}
|
|
render() {
|
|
const { area } = this.props;
|
|
if (area.isEmpty()) {
|
|
return null;
|
|
}
|
|
return (
|
|
<div className={classNames('lc-bottom-area', {
|
|
'lc-area-visible': area.visible,
|
|
})}>
|
|
<Contents area={area} />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
@observer
|
|
class Contents extends Component<{ area: Area<any, Panel> }> {
|
|
render() {
|
|
const { area } = this.props;
|
|
return (
|
|
<Fragment>
|
|
{area.container.items.map((item) => item.content)}
|
|
</Fragment>
|
|
);
|
|
}
|
|
}
|