From b111c344663162be61412869a9fd204698334134 Mon Sep 17 00:00:00 2001 From: Tomas Carnecky Date: Tue, 13 Aug 2019 20:52:32 +0200 Subject: [PATCH] [InlineWrapper]: Don't force any width on the paper Fixes #1243 --- lib/src/wrappers/InlineWrapper.tsx | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/src/wrappers/InlineWrapper.tsx b/lib/src/wrappers/InlineWrapper.tsx index 5c51dbb8f..d4b381ff5 100644 --- a/lib/src/wrappers/InlineWrapper.tsx +++ b/lib/src/wrappers/InlineWrapper.tsx @@ -1,25 +1,9 @@ import * as React from 'react'; import * as PropTypes from 'prop-types'; -import clsx from 'clsx'; import Popover, { PopoverProps as PopoverPropsType } from '@material-ui/core/Popover'; import { WrapperProps } from './Wrapper'; -import { makeStyles } from '@material-ui/core/styles'; import { useKeyDown } from '../_shared/hooks/useKeyDown'; import { TextFieldProps } from '@material-ui/core/TextField'; -import { DIALOG_WIDTH, DIALOG_WIDTH_WIDER } from '../constants/dimensions'; - -export const useStyles = makeStyles( - { - popoverPaper: { - width: DIALOG_WIDTH, - paddingBottom: 8, - }, - popoverPaperWider: { - width: DIALOG_WIDTH_WIDER, - }, - }, - { name: 'MuiPickersInlineWrapper' } -); export interface InlineWrapperProps extends WrapperProps { /** Popover props passed to material-ui Popover (with variant="inline") */ @@ -41,7 +25,6 @@ export const InlineWrapper: React.FC = ({ ...other }) => { const ref = React.useRef(); - const classes = useStyles(); useKeyDown(open, { Enter: onAccept, @@ -55,9 +38,6 @@ export const InlineWrapper: React.FC = ({ open={open} onClose={onDismiss} anchorEl={ref.current} - classes={{ - paper: clsx(classes.popoverPaper, { [classes.popoverPaperWider]: wider }), - }} anchorOrigin={{ vertical: 'bottom', horizontal: 'center',