@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
9 lines (8 loc) • 1.38 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import SimpleButton from '../SimpleButton';
import join from '../utils/join';
import { ACCESS_LEVEL_READ_ONLY } from '../../Utilities/Constants/GeneralConstants';
import { Flex } from '../Flex';
export function DashboardToolbar(props) {
return (_jsxs("div", { className: join('ab-Dashboard__toolbar', props.className), children: [_jsx("div", { className: "ab-Dashboard__toolbar-content", children: props.children }), _jsxs(Flex, { className: "ab-Dashboard__toolbar-title twa:items-center twa:justify-center twa:px-2 twa:pb-1 twa:opacity-70", flexDirection: "row", children: [_jsx("span", { className: "twa:text-2", children: props.title }), props.showConfigure && (_jsx(SimpleButton, { "aria-label": `Configure ${props.title}`, icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })), props.showClose && (_jsx(SimpleButton, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == ACCESS_LEVEL_READ_ONLY, "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose?.() }))] })] }));
}