Skip to content

Commit

Permalink
Merge pull request mui#783 from dmtrKovalenko/unexpected-docs-spacing
Browse files Browse the repository at this point in the history
[docs] Unexpected docs spacing
  • Loading branch information
dmtrKovalenko committed Nov 27, 2018
2 parents 9f77ae9 + c447ad4 commit 728e6b9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 31 deletions.
26 changes: 9 additions & 17 deletions docs/src/Pages/GettingStarted/Installation.jsx
Expand Up @@ -5,7 +5,7 @@ import { Typography } from '@material-ui/core';
// eslint-disable-next-line
import muiPickerProviderCode from '!raw-loader!./MuiPickersProvider.example.jsx';

const installLibCode = `npm i @date-io/date-fns date-fns@2.0.0-alpha.16
const installLibCode = `npm i @date-io/date-fns date-fns@2.0.0-alpha.25
// or
npm i @date-io/moment moment
// or
Expand All @@ -17,7 +17,7 @@ const Installation = () => (
Installation
</Typography>
<Typography variant="body1" gutterBottom>
Available as
Available as{' '}
<a
className="link"
href="https://www.npmjs.com/package/material-ui-pickers"
Expand All @@ -37,37 +37,29 @@ const Installation = () => (
</Typography>

<Typography variant="body1" gutterBottom>
We are providing interfaces for
We are providing interfaces for{' '}
<a className="link" href="https://momentjs.com/">
moment
</a>
&nbsp;,
,{' '}
<a className="link" href="https://date-fns.org/">
date-fns 2
date-fns 2{' '}
</a>
and
and{' '}
<a className="link" href="https://moment.github.io/luxon/">
luxon
</a>
. P.S. If you are not using moment in the project (or dont have it in the
P.S. If you are not using moment in the project (or dont have it in the
bundle already) we suggest using date-fns, because it is much more
lightweight and will be correctly tree-shaken from the bundle.
</Typography>

<Typography variant="body1" gutterBottom>
Note, that we support only 2.0.0-alpha.16 version of date-fns for now (see
&nbsp;
<a
className="link"
href="https://github.com/dmtrKovalenko/material-ui-pickers/issues/414#issuecomment-389523267"
>
#414
</a>
). Stay tuned!
Note, that we support only 2.0.0-alpha versions of date-fns for now.
</Typography>

<Code withMargin text={installLibCode} />
<Typography>
<Typography variant="body1">
Teach pickers how to use one of that library using
<span className="inline-code">MuiPickersUtilsProvider</span>. This
component takes an utils property, and makes it available down the React
Expand Down
16 changes: 8 additions & 8 deletions docs/src/Pages/GettingStarted/ParsingDates.jsx
Expand Up @@ -7,15 +7,15 @@ const ParsingDates = () => (
Parsing dates
</Typography>

<Typography gutterBottom>
<Typography gutterBottom variant="body1">
Material-UI pickers rely on the date management library when the date
should be parsed. For any prop-types, that accept actually the date (e.g.
<span className="inline-code">minDate</span>,
<span className="inline-code">maxDate</span>) accept string, number, Date
object and so on.
<span className="inline-code"> minDate </span>,
<span className="inline-code"> maxDate </span>) accept string, number,
Date object and so on.
</Typography>

<Typography>
<Typography variant="body1">
Find more information about parsing dates in docs for your library:
</Typography>

Expand All @@ -35,10 +35,10 @@ const ParsingDates = () => (
</li>
</ul>

<Typography gutterBottom>
<Typography gutterBottom variant="h6">
Pass any value to the picker, and if it won`t be parsed as expected feel
free to open issue on our
<a href="https://github.com/dmtrKovalenko/material-ui-pickers">github</a>
free to open issue on our{' '}
<a href="https://github.com/dmtrKovalenko/material-ui-pickers">github</a>{' '}
😎
</Typography>
</div>
Expand Down
10 changes: 5 additions & 5 deletions lib/.size-snapshot.json
@@ -1,15 +1,15 @@
{
"build/dist/material-ui-pickers.esm.js": {
"bundled": 114113,
"minified": 67041,
"gzipped": 14575,
"bundled": 114136,
"minified": 67061,
"gzipped": 14590,
"treeshaked": {
"rollup": {
"code": 49331,
"code": 49351,
"import_statements": 1317
},
"webpack": {
"code": 56135
"code": 56155
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion lib/src/DateTimePicker/DateTimePickerModal.tsx
Expand Up @@ -41,7 +41,8 @@ export const DateTimePickerModal: React.SFC<
} = props;

// do not show tabs for small screens
const toShowTabs = showTabs && window && window.innerHeight > 667;
const toShowTabs =
showTabs && typeof window !== 'undefined' && window.innerHeight > 667;
return (
<BasePicker {...props}>
{({
Expand Down

0 comments on commit 728e6b9

Please sign in to comment.