March 2019
Intermediate to advanced
534 pages
14h 52m
English
If you want your Typography component to inherit the variant styles from its parent, you can use the inherit variant value, as shown in the following example:
<Typography variant="title" component="div"> <Typography variant="inherit"> inherited title variant </Typography> <Typography variant="inherit"> another inherited title variant </Typography> <Typography variant="caption"> overridden caption variant </Typography></Typography>
The parent Typography component uses the title variant. It also changes its component to be a div element, because it's not actually rendering text as direct children—think of it as a container for font styles. Inside, there are three child Typography components. The first two have inherit as the ...
Read now
Unlock full access