From 934fb17d0a94b61ecbad337dd2d20aa74f52c6f8 Mon Sep 17 00:00:00 2001 From: Alec Caputo Date: Thu, 6 Feb 2020 18:06:07 -0500 Subject: [PATCH] export more types for typography - export useful TS types for typography which were hard to discover - Remove unused code --- .../material-ui/src/Typography/Typography.d.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/material-ui/src/Typography/Typography.d.ts b/packages/material-ui/src/Typography/Typography.d.ts index 1cadd8234ea8c7..4e2fa1899e1024 100644 --- a/packages/material-ui/src/Typography/Typography.d.ts +++ b/packages/material-ui/src/Typography/Typography.d.ts @@ -1,13 +1,15 @@ import * as React from 'react'; -import { StandardProps, PropTypes } from '..'; -import { OverrideProps, OverridableTypeMap, OverridableComponent } from '../OverridableComponent'; +import { PropTypes } from '..'; +import { OverrideProps, OverridableComponent } from '../OverridableComponent'; import { Variant as ThemeVariant } from '../styles/createTypography'; -type Variant = ThemeVariant | 'srOnly'; +export type TypographyVariant = ThemeVariant | 'srOnly'; + +export type TypographyAlignment = PropTypes.Alignment; export interface TypographyTypeMap

{ props: P & { - align?: PropTypes.Alignment; + align?: TypographyAlignment; color?: | 'initial' | 'inherit' @@ -20,8 +22,8 @@ export interface TypographyTypeMap

gutterBottom?: boolean; noWrap?: boolean; paragraph?: boolean; - variant?: Variant | 'inherit'; - variantMapping?: Partial>; + variant?: TypographyVariant | 'inherit'; + variantMapping?: Partial>; }; defaultComponent: D; classKey: TypographyClassKey;