React beginner here, here i'm changing the background color of rows(which works) and also giving opacity: 0.3, which gives opacity to everything to that specific row, i want to give that opacity just to background-color and not anything else.
<Table
bordered
columns={columns}
dataSource={this.data}
rowClassName={(record, index) => (record.amount > 50 ? "purple" : "green")}
/>
css:
.purple{
background-color: rgba(190, 144, 212, 0.2) !important;
opacity: 0.05;}
.green {
color :green;
}
data:
data = [
{
key: 0,
date: "2018-02-11",
amount: 40,
type: "income",
note: "transfer"
},
{
key: 1,
date: "2018-03-11",
amount: 243,
type: "income",
note: "transfer"
},
{
key: 2,
date: "2018-04-11",
amount: 98,
type: "income",
note: "transfer"
}
];