@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
12 lines (11 loc) • 862 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useState } from 'react';
import { ReportFormatSelector } from './ReportFormatSelector';
import { ExportDestinationPicker } from './ExportDestinationPicker';
import { Flex } from '../../components/Flex';
export const ReportListItem = (props) => {
const report = props.data;
const [reportFormat, setReportFormat] = useState(null);
const viewType = 'SettingsPanel';
return (_jsxs(Flex, { flexDirection: "row", className: `ab-${viewType}__Export__panel twa:gap-2`, children: [_jsx(ReportFormatSelector, { viewType: viewType, reportName: report.Name, reportFormat: reportFormat, onReportFormatSelected: (reportFormat) => setReportFormat(reportFormat) }), _jsx(ExportDestinationPicker, { viewType: "SettingsPanel", reportName: report.Name, reportFormat: reportFormat })] }));
};