Currently experimenting with gradient designs on a material table. While I am able to apply the right color combination to the rows, I seem to be getting column-based results on the title of the table. Attached is a screenshot of my output for reference.
https://i.stack.imgur.com/HM69b.png
Below is the code snippet:
function RowStyling() {
return (
<MaterialTable
title="Row Styling Preview"
columns={[
{ title: 'Name', field: 'name' },
{ title: 'Surname', field: 'surname' },
{ title: 'Birth Year', field: 'birthYear', type: 'numeric' },
{
title: 'Birth Place',
field: 'birthCity',
lookup: { 34: 'İstanbul', 63: 'Şanlıurfa' },
},
]}
data={[
{ name: 'Mehmet', surname: 'Baran', birthYear: 1987, birthCity: 63 },
{ name: 'Zerya Betül', surname: 'Baran', birthYear: 2017, birthCity: 34 },
]}
options={{
rowStyle: {
background: 'linear-gradient(to right,#137a8b,#30e4fb)',
border: '2px white solid',
borderRadius: '50px'
},
headerStyle: {
background: 'linear-gradient(to right,#137a8b,#30e4fb)',
color: '#FFF',
}
}}
/>
)
}
If you want to make the headers look like the rows, refer to the material-table styling documentation here.