How can I add styles to the property currentPageReportTemplate from this component:
public render(): React.ReactElement<IMonitoringProps> {
const template = {
layout: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown CurrentPageReport',
CurrentPageReport: `${this.props.strings.TotalRecords} {totalRecords}`
// 'CurrentPageReport': <span style=
// {{fontFamily: 'Rubik, sans-serif',
// fontSize: '12px',
// fontWeight: 'normal',
// letterSpacing: '0px',
// color: '#667891'}}>
// {this.props.strings.TotalRecords} {this.state.totalCount}
// </span>
};
const tableColumns = this.getTableColumns();
return (
<div id="monitoring-page">
<StyledFuncRow className="additional-func-row" data-test="func-row">
<MonitoringFilters
strings={this.props.strings}
typeOptions={this.getTypeColumnOptions()}
onRangeSelected={this.filterData}
/>
</StyledFuncRow>
<StyledMonitoringTable
dataKey="id"
tableClassName="monitoring-table"
value={this.state.records}
paginator={true}
rows={this.tableRowsCount}
first={this.state.first}
lazy={true}
expandedRows={this.state.expandedRows}
rowExpansionTemplate={(data) => this.nestedTableTemplate(data)}
totalRecords={this.state.totalCount}
emptyMessage={this.props.strings.NoRecordsFound}
onRowToggle={(e) => this.rowToggled(e.data)}
onPage={this.onPageChanged}
rowsPerPageOptions={[20, 50, 100]}
pageLinkSize={11}
paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown CurrentPageReport"
currentPageReportTemplate={`${this.props.strings.TotalRecords} {totalRecords}`}>
{tableColumns}
</StyledMonitoringTable>
</div>
);
}
As you see I was using a template, but it didn't work. How can I add the commented styles in the template object to the currentPageReportTemplate?