I would like to change the fontSize of the contents of a table in Material UI.
If I change it using the style={{}}
component, it's not getting reflected.
<Grid ><Typography variant="body1">Fiscal Year </Typography></Grid>
<TableContainer style={{width:600,height:170}}>
<Table
sx={{alignItems: "center",
display:""}} style={{fontSize:100}}
>
{stats?.['Financial Highlights']?.['Fiscal Year']?<TableBody>
<TableRow hover>
<TableCell align="left"> Fiscal Year Ends</TableCell>
<TableCell align="right"> {stats['Financial Highlights']['Fiscal Year']['Fiscal Year Ends']===null?"N/A":stats['Financial Highlights']['Fiscal Year']['Fiscal Year Ends']}</TableCell>
</TableRow>
<TableRow hover>
<TableCell align="left"> Most Recent Quarter (mrq)</TableCell>
<TableCell align="right">{stats['Financial Highlights']['Fiscal Year']['Most Recent Quarter (mrq)']===null?"N/A":stats['Financial Highlights']['Fiscal Year']['Most Recent Quarter (mrq)']}</TableCell>
</TableRow>
</TableBody>:"Loading..."}
</Table>
</TableContainer>
I cant include a Typography
tag for every row of my table as there are too many tables.
Also, I am unable to move the text Fiscal Year to the left using the float:'left'
property. Instead of having it at the centre I would like it aligned to the left.
Any help regarding either matter is appreciated.