@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
10 lines (9 loc) • 737 B
JavaScript
import * as React from 'react';
import { ButtonDelete } from '../Components/Buttons/ButtonDelete';
import * as ChartingRedux from '../../Redux/ActionsReducers/ChartingRedux';
import { isAgChartDefinition } from '../../AdaptableState/ChartingState';
export const DeleteChartButton = (props) => {
return (React.createElement(ButtonDelete, { iconSize: props.iconSize, disabled: !props.chart, ConfirmAction: isAgChartDefinition(props.chart)
? ChartingRedux.ChartingDeleteChart(props.chart)
: ChartingRedux.ChartingDeleteExternalChart(props.chart), ConfirmationMsg: `Are you sure you want to delete this Charts?`, ConfirmationTitle: 'Delete Charts', accessLevel: props.accessLevel, tooltip: "Delete Chart" }));
};