function Example(pageContext) {
const { protrakComponents } = React.useContext(customWidgetContext);
const { ExportCSVButton } = protrakComponents;
const {
data,
config,
showDrilldown,
onClick,
setShowDrilldown,
totalData,
filters,
typeName,
sortState,
onSortApplied,
typePluralName,
states,
} = pageContext;
const columns = [
{ key: "DELIVERED Nos", label: "DELIVERED Nos", type: "number" },
{ key: "DELIVERED Cum", label: "DELIVERED Cum", type: "number" },
{ key: "DELIVERED %", label: "DELIVERED %", type: "%" },
{ key: "Stock Nos", label: "Stock Nos", type: "number" },
{ key: "Stock Cum", label: "Stock Cum", type: "number" },
{ key: "ERECTED Nos", label: "ERECTED Nos", type: "number" },
{ key: "ERECTED Cum", label: "ERECTED Cum", type: "number" },
{ key: "ERECTED %", label: "ERECTED %", type: "%" },
{ key: "Stock At Site Nos", label: "Stock At Site Nos", type: "number" },
{ key: "Stock At Site Cum", label: "Stock At Site Cum", type: "number" },
];
return(
<ExportCSVButton
data={data}
headers={columns}
filename={typePluralName + "-" + config.name}
attributeFieldss={config.fields}
/>
);
};