Skip to content

Commit

Permalink
[core] Fix TypographyStyle not allowing media queries and allowing un…
Browse files Browse the repository at this point in the history
…safe undefined access mui#19269
  • Loading branch information
eps1lon committed Jan 17, 2020
1 parent 90b2c5b commit 9a2a9d2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/material-ui/src/styles/createTypography.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ export interface FontStyleOptions extends Partial<FontStyle> {
allVariants?: CSSProperties;
}

export type TypographyStyle = Required<
Pick<CSSProperties, 'fontFamily' | 'fontSize' | 'fontWeight' | 'fontStyle' | 'color'>
> &
Partial<Pick<CSSProperties, 'letterSpacing' | 'lineHeight' | 'textTransform'>>;

export interface TypographyStyleOptions extends Partial<TypographyStyle> {}
// TODO: which one should actually be allowed to be subject to module augmentation?
// current type vs interface decision is kept for historical reasons until we
// made a decision
export type TypographyStyle = CSSProperties;
export interface TypographyStyleOptions extends TypographyStyle {}

export interface TypographyUtils {
pxToRem: (px: number) => string;
Expand Down

0 comments on commit 9a2a9d2

Please sign in to comment.