Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Export TypographyVariant type #19598

Merged
merged 4 commits into from
Feb 14, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this as explained in #19572 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eps1lon fixed

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