Reputation: 1309
Following this example: https://material-table.com/#/docs/features/localization
I would like to give custom style (basically color is my interest) to EmptyDataSourceMessage.
Any idea how can I do that?
Upvotes: 2
Views: 1083
Reputation: 1484
I was able to add HTML the the EmptyDataSource message using this in the render function:
const emailContact = <a href="mailto:myEmailAddressHere">Email Info</a>;
const noResultsMessage = <span>No results were found. Please email {emailContact</span>;
and then in the return method adding:
localization={{
body: {
emptyDataSourceMessage: noResultsMessage
}
}}
Upvotes: 2