Skip to content

Commit

Permalink
Fix "combines system properties with the sx prop"
Browse files Browse the repository at this point in the history
  • Loading branch information
emlai committed Sep 23, 2022
1 parent 211d693 commit d3284d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/mui-material/src/Typography/Typography.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { getPath } from '@mui/system';
import { unstable_extendSxProp as extendSxProp, getPath } from '@mui/system';
import { unstable_composeClasses as composeClasses } from '@mui/base';
import styled, { rootShouldForwardProp } from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
Expand Down Expand Up @@ -92,7 +92,8 @@ const transformDeprecatedColors = (color) => {
};

const Typography = React.forwardRef(function Typography(inProps, ref) {
const props = useThemeProps({ props: inProps, name: 'MuiTypography' });
const themeProps = useThemeProps({ props: inProps, name: 'MuiTypography' });
const props = { ...extendSxProp(themeProps), color: themeProps.color };

const {
align = 'inherit',
Expand Down

0 comments on commit d3284d8

Please sign in to comment.