March 2019
Intermediate to advanced
534 pages
14h 52m
English
For this example, you'll find a Storybook control that allows you to change the color of the text using predefined Color names from the theme, as shown in the following screenshot:

Here's the source for the example that uses the selected color by passing it to the color property of each Typography component:
import React, { Fragment } from 'react';import Typography from '@material-ui/core/Typography';const UsingThemeColors = ({ color }) => ( <Fragment> <Typography variant="h1" color={color}> h1 variant </Typography> <Typography variant="h2" color={color}> h2 variant </Typography> <Typography variant="h3" color={color}> h3 variant ...Read now
Unlock full access