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

[Snackbar] Fix SnackbarOrigin TypeScript definition #12083

Merged
merged 4 commits into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -1409,8 +1409,8 @@ declare module "material-ui/Snackbar/Snackbar" {
} from "material-ui/internal/transition";

declare type Origin = {
horizontal?: "left" | "center" | "right" | number,
vertical?: "top" | "center" | "bottom" | number
horizontal: "left" | "center" | "right" | number,
vertical: "top" | "center" | "bottom" | number
};

declare module.exports: React$ComponentType<{
Expand Down
8 changes: 4 additions & 4 deletions packages/material-ui/src/Snackbar/Snackbar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { StandardProps } from '..';
import { SnackbarContentProps } from '../SnackbarContent';
import { TransitionHandlerProps, TransitionProps } from '../transitions/transition';

export type SnackBarOrigin = {
horizontal?: 'left' | 'center' | 'right' | number;
vertical?: 'top' | 'center' | 'bottom' | number;
export type SnackbarOrigin = {
horizontal: 'left' | 'center' | 'right' | number;
vertical: 'top' | 'center' | 'bottom' | number;
};

export interface SnackbarProps
Expand All @@ -14,7 +14,7 @@ export interface SnackbarProps
SnackbarClassKey
> {
action?: React.ReactElement<any> | React.ReactElement<any>[];
anchorOrigin?: SnackBarOrigin;
anchorOrigin?: SnackbarOrigin;
autoHideDuration?: number;
ContentProps?: Partial<SnackbarContentProps>;
disableWindowBlurListener?: boolean;
Expand Down