@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
14 lines (13 loc) • 853 B
JavaScript
import * as React from 'react';
import { useState } from 'react';
import { Flex } from 'rebass';
import { ReportFormatSelector } from './ReportFormatSelector';
import { ExportDestinationPicker } from './ExportDestinationPicker';
export const ReportListItem = (props) => {
const report = props.data;
const [reportFormat, setReportFormat] = useState(null);
const viewType = 'SettingsPanel';
return (React.createElement(Flex, { flexDirection: "row", className: `ab-${viewType}__Export__panel` },
React.createElement(ReportFormatSelector, { viewType: viewType, reportName: report.Name, reportFormat: reportFormat, onReportFormatSelected: (reportFormat) => setReportFormat(reportFormat) }),
React.createElement(ExportDestinationPicker, { viewType: "SettingsPanel", reportName: report.Name, reportFormat: reportFormat })));
};