Skip to content

Commit

Permalink
Type SnackbarContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhosseindhv committed Mar 8, 2020
1 parent 2bf0f0f commit 9196675
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/SnackbarContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ const useStyle = makeStyles(theme => ({
}));


type SnackbarContainerProps = Required<{
className: string;
interface SnackbarContainerProps {
children: JSX.Element | JSX.Element[];
className?: string;
dense: SnackbarProviderProps['dense'];
anchorOrigin: SnackbarProviderProps['anchorOrigin'];
}>
anchorOrigin: NonNullable<SnackbarProviderProps['anchorOrigin']>;
}

const SnackbarContainer: React.FC<SnackbarContainerProps> = (props) => {
const classes = useStyle();
Expand All @@ -61,7 +61,9 @@ const SnackbarContainer: React.FC<SnackbarContainerProps> = (props) => {
classes.root,
classes[anchorOrigin.vertical],
classes[anchorOrigin.horizontal],
// @ts-ignore
classes[`${anchorOrigin.vertical}${dense ? 'Dense' : ''}`],
// @ts-ignore
classes[`${anchorOrigin.horizontal}${dense ? 'Dense' : ''}`],
{ [classes.reverseColumns]: anchorOrigin.vertical === 'bottom' },
className,
Expand Down

0 comments on commit 9196675

Please sign in to comment.