Skip to content

Commit

Permalink
export more types for typography
Browse files Browse the repository at this point in the history
- export useful TS types for typography which were hard to discover
- Remove unused code
  • Loading branch information
aleccaputo committed Feb 6, 2020
1 parent 3764e63 commit 934fb17
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/material-ui/src/Typography/Typography.d.ts
Original file line number Diff line number Diff line change
@@ -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<P = {}, D extends React.ElementType = 'span'> {
props: P & {
align?: PropTypes.Alignment;
align?: TypographyAlignment;
color?:
| 'initial'
| 'inherit'
Expand All @@ -20,8 +22,8 @@ export interface TypographyTypeMap<P = {}, D extends React.ElementType = 'span'>
gutterBottom?: boolean;
noWrap?: boolean;
paragraph?: boolean;
variant?: Variant | 'inherit';
variantMapping?: Partial<Record<Variant, string>>;
variant?: TypographyVariant | 'inherit';
variantMapping?: Partial<Record<TypographyVariant, string>>;
};
defaultComponent: D;
classKey: TypographyClassKey;
Expand Down

0 comments on commit 934fb17

Please sign in to comment.