<Typography variant="caption" align="center" /> inside <TableCell /> does not align to center, but <Typography variant="body2" align="center" /> does.
Both should align to center as expected regardless of the variant.
<TableCell>
<Typography variant="caption" align="center">
left aligned, unexpected
</Typography>
</TableCell>
<TableCell>
<Typography variant="body2" align="center">
center aligned, correct
</Typography>
</TableCell>
Just trying to align stuff, a solution that worked is to override root theme for TableCell.
Not sure if this is by design, also I think its also present in variant="overline"
const theme = createMuiTheme({
overrides: {
MuiTableCell: {
root: {
textAlign: null,
},
},
},
});
| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.?.? |
| React | 16.9.0 |
| Browser | 74.0.3729.169 |
馃憢 Thanks for using Material-UI!
We use the issue tracker exclusively for bug reports and feature requests, however,
this issue appears to be a support request or question. Please ask on StackOverflow where the
community will do their best to help. There is a "material-ui" tag that you can use to tag your
question.
If you would like to link from here to your question on SO, it will help others find it.
If your issues is confirmed as a bug, you are welcome to reopen the issue using the issue template.
Tip: check the display mode.
try adding component="div" to Typography.