Skip to content

Commit

Permalink
[Snackbar] Fix SnackbarOrigin TypeScript definition (mui#12083)
Browse files Browse the repository at this point in the history
* Make SnackBarOrigin properties mandatory

* Make SnackBarOrigin properties mandatory

* Rename SnackBar to Snackbar

* yarn docs:api
  • Loading branch information
kobelobster authored and Joe Shelby committed Jul 14, 2018
1 parent 725cc5d commit 15e1d92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 15e1d92

Please sign in to comment.