I am trying to establish a new class in a component of type "table" of Ant Desing, as I would do with any other component, such as a letter or a layout, the problem is that when I add "className" in the element of a table, the table It doesn't take any kind of style, someone knows how I can add an extra custom class to the ant desgin tables ...
this is what im triying to do, but i dont get any result adding a new class
<Fragment>
<Table className="modal-table" pagination={false} columns={columns} dataSource={data} onChange={onChange} scroll={{ y: 200 }} />
</Fragment>
Any class name you apply to the table component will be forwarded to the table's wrapper div, and any styles will be applied normally to that element as well. If you're trying to target a different element within the table, you'd need to override the styles with CSS by targeting its class name.
Since the custom class name is applied to the outermost wrapper div, you can use it to specify the CSS selectors for the AntD classes and target only the table you want to. For example, if you apply className="my-table"
to the Table, you can target any class within it like this:
.my-table .ant-table-thead {
background: red;
}