diff --git a/lib/src/__tests__/e2e/DarkTheme.test.tsx b/lib/src/__tests__/e2e/Theme.test.tsx
similarity index 68%
rename from lib/src/__tests__/e2e/DarkTheme.test.tsx
rename to lib/src/__tests__/e2e/Theme.test.tsx
index d08e4463227edd..087f56c147fad8 100644
--- a/lib/src/__tests__/e2e/DarkTheme.test.tsx
+++ b/lib/src/__tests__/e2e/Theme.test.tsx
@@ -1,5 +1,6 @@
import React from 'react';
import { mount } from '../test-utils';
+import { DatePicker } from '../../DatePicker';
import { createMuiTheme } from '@material-ui/core';
import { ThemeProvider } from '@material-ui/styles';
import { DateTimePicker } from '../../DateTimePicker/DateTimePicker';
@@ -19,3 +20,11 @@ test('Should renders without crash in dark theme', () => {
expect(component).toBeTruthy();
});
+
+test('Should render component with different orientation', () => {
+ const component = mount(
+
+ );
+
+ expect(component).toBeTruthy();
+});
diff --git a/lib/src/_shared/ModalDialog.tsx b/lib/src/_shared/ModalDialog.tsx
index 8a6cbfb884f2f1..650d812ea10dd6 100644
--- a/lib/src/_shared/ModalDialog.tsx
+++ b/lib/src/_shared/ModalDialog.tsx
@@ -4,7 +4,7 @@ import Button from '@material-ui/core/Button';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import Dialog, { DialogProps } from '@material-ui/core/Dialog';
-import { DIALOG_WIDTH, DIALOG_WIDTH_WIDER } from '../constants/dimensions';
+import { DIALOG_WIDTH } from '../constants/dimensions';
import { createStyles, WithStyles, withStyles } from '@material-ui/core/styles';
export interface ModalDialogProps extends DialogProps {
@@ -90,15 +90,12 @@ ModalDialog.displayName = 'ModalDialog';
export const styles = createStyles({
dialogRoot: {
minWidth: DIALOG_WIDTH,
- maxWidth: DIALOG_WIDTH_WIDER,
+ // maxWidth: DIALOG_WIDTH_WIDER,
},
dialogRootWider: {
- minWidth: DIALOG_WIDTH_WIDER,
+ // minWidth: DIALOG_WIDTH_WIDER,
},
dialog: {
- // minHeight: dialogHeight,
- overflow: 'hidden',
-
'&:first-child': {
padding: 0,
},
diff --git a/lib/src/_shared/PickerToolbar.tsx b/lib/src/_shared/PickerToolbar.tsx
index bbd02e9be11196..c47fa7c82aa786 100644
--- a/lib/src/_shared/PickerToolbar.tsx
+++ b/lib/src/_shared/PickerToolbar.tsx
@@ -8,8 +8,8 @@ export const useStyles = makeStyles(
theme => ({
toolbar: {
display: 'flex',
- flexDirection: 'column',
- alignItems: 'flex-start',
+ flexDirection: 'row',
+ alignItems: 'center',
justifyContent: 'center',
height: 100,
backgroundColor:
@@ -17,19 +17,33 @@ export const useStyles = makeStyles(
? theme.palette.primary.main
: theme.palette.background.default,
},
+ toolbarLandscape: {
+ height: 'auto',
+ maxWidth: 150,
+ padding: 8,
+ justifyContent: 'flex-start',
+ },
}),
{ name: 'MuiPickersToolbar' }
);
-const PickerToolbar: React.SFC
> = ({
+interface PickerToolbarProps extends ExtendMui {
+ isLandscape: boolean;
+}
+
+const PickerToolbar: React.SFC = ({
children,
+ isLandscape,
className = null,
...other
}) => {
const classes = useStyles();
return (
-
+
{children}
);
diff --git a/lib/src/_shared/ToolbarButton.tsx b/lib/src/_shared/ToolbarButton.tsx
index 37ea2f19c28c32..110528f39d4c42 100644
--- a/lib/src/_shared/ToolbarButton.tsx
+++ b/lib/src/_shared/ToolbarButton.tsx
@@ -13,6 +13,7 @@ export interface ToolbarButtonProps
variant: TypographyProps['variant'];
selected: boolean;
label: string;
+ align?: TypographyProps['align'];
typographyClassName?: string;
}
@@ -22,12 +23,14 @@ const ToolbarButton: React.FunctionComponent = ({
label,
selected,
variant,
+ align,
typographyClassName,
...other
}) => {
return (