I have been using the Table
component provided by the material-ui
library in my React project. However, I have encountered an issue where each row, including the header, has a padding of 24px
on the top and bottom that I am unable to modify or overwrite. Despite attempting to adjust the styles of all underlying components, I have not been successful in resolving this issue. Below is the code snippet that illustrates the structure:
<Table>
<TableHeader adjustForCheckbox={false} displaySelectAll={false} fixedHeader={true}>
<TableRow>
<TableHeaderColumn>id</TableHeaderColumn>
<TableHeaderColumn>name</TableHeaderColumn>
<TableHeaderColumn>number</TableHeaderColumn>
</TableRow>
</TableHeader>
<TableBody showRowHover={true} displayRowCheckbox={false}>
{data.map(item => {
return (
<TableRow key={item.id}>
<TableRowColumn>{item.id}</TableRowColumn>
<TableRowColumn>{item.name}</TableRowColumn>
<TableRowColumn>{item.number}</TableRowColumn>
</TableRow>
);
})}
</TableBody>
</Table>
Can anyone suggest which specific component's style should be modified to override this unwanted padding?