Skip to content

Commit

Permalink
[InlineWrapper]: Don't force any width on the paper
Browse files Browse the repository at this point in the history
Fixes #1243
  • Loading branch information
wereHamster committed Aug 11, 2019
1 parent ea4c299 commit 496a999
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lib/src/wrappers/InlineWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ 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<T = TextFieldProps> extends WrapperProps<T> {
/** Popover props passed to material-ui Popover (with variant="inline") */
PopoverProps?: Partial<PopoverPropsType>;
Expand All @@ -41,7 +28,6 @@ export const InlineWrapper: React.FC<InlineWrapperProps> = ({
...other
}) => {
const ref = React.useRef();
const classes = useStyles();

useKeyDown(open, {
Enter: onAccept,
Expand All @@ -55,9 +41,6 @@ export const InlineWrapper: React.FC<InlineWrapperProps> = ({
open={open}
onClose={onDismiss}
anchorEl={ref.current}
classes={{
paper: clsx(classes.popoverPaper, { [classes.popoverPaperWider]: wider }),
}}
anchorOrigin={{
vertical: 'bottom',
horizontal: 'center',
Expand Down

0 comments on commit 496a999

Please sign in to comment.