@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
16 lines (15 loc) • 865 B
JavaScript
import * as React from 'react';
/// <reference path="../../typings/.d.ts" />
import { ButtonNew } from '../Buttons/ButtonNew';
import { SummaryRowItem } from './SummaryRowItem';
import { ModuleProfile } from '../ModuleProfile';
export class ModuleHeader extends React.Component {
render() {
let summaryItems = [];
let newButton = this.props.newButtonDisabled ? null : (React.createElement(ButtonNew, { onClick: () => this.props.onNew(), tooltip: 'Create ' + this.props.newButtonTooltip, accessLevel: this.props.accessLevel }));
summaryItems.push(React.createElement("b", null, React.createElement(ModuleProfile, { moduleInfo: this.props.moduleInfo })));
summaryItems.push(this.props.moduleSummary);
summaryItems.push(newButton);
return React.createElement(SummaryRowItem, { SummaryItems: summaryItems });
}
}