How it works...

The color property defaults to inherit, which means that icons will be the same color as their parent components. Let's walk through the different color values and see what these icons from the example look like:

Inherit The inherit color value will use the color value from the parent component style:
Primary The primary color applies the palette.primary.main theme color to the icon:
Secondary The secondary color applies the palette.secondary.main theme color to the icon:
Action The action color applies the palette ...

Get React Material-UI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.