From eb520be67c86cd26624cc265c214685b3b3df20c Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 28 Jul 2018 20:42:30 +0200 Subject: [PATCH] [docs] Document NoSsr --- docs/scripts/buildApi.js | 2 +- docs/src/modules/components/HomeBackers.js | 6 ++-- docs/src/modules/components/HomeSteps.js | 6 ++-- docs/src/modules/components/withRoot.js | 4 +++ .../autocomplete/IntegrationReactSelect.js | 6 ++-- docs/src/pages/utils/no-ssr/SimpleNoSsr.js | 35 +++++++++++++++++++ docs/src/pages/utils/no-ssr/no-ssr.md | 16 +++++++++ packages/material-ui/src/NoSSR/NoSSR.d.ts | 10 ------ packages/material-ui/src/NoSSR/index.d.ts | 2 -- packages/material-ui/src/NoSSR/index.js | 1 - packages/material-ui/src/NoSsr/NoSsr.d.ts | 10 ++++++ .../src/{NoSSR/NoSSR.js => NoSsr/NoSsr.js} | 21 +++++------ .../NoSSR.test.js => NoSsr/NoSsr.test.js} | 16 ++++----- packages/material-ui/src/NoSsr/index.d.ts | 2 ++ packages/material-ui/src/NoSsr/index.js | 1 + .../src/SwipeableDrawer/SwipeableDrawer.js | 6 ++-- packages/material-ui/src/index.d.ts | 2 +- packages/material-ui/src/index.js | 2 +- pages/api/no-ssr.js | 10 ++++++ pages/api/no-ssr.md | 32 +++++++++++++++++ pages/utils/no-ssr.js | 23 ++++++++++++ 21 files changed, 167 insertions(+), 46 deletions(-) create mode 100644 docs/src/pages/utils/no-ssr/SimpleNoSsr.js create mode 100644 docs/src/pages/utils/no-ssr/no-ssr.md delete mode 100644 packages/material-ui/src/NoSSR/NoSSR.d.ts delete mode 100644 packages/material-ui/src/NoSSR/index.d.ts delete mode 100644 packages/material-ui/src/NoSSR/index.js create mode 100644 packages/material-ui/src/NoSsr/NoSsr.d.ts rename packages/material-ui/src/{NoSSR/NoSSR.js => NoSsr/NoSsr.js} (66%) rename packages/material-ui/src/{NoSSR/NoSSR.test.js => NoSsr/NoSsr.test.js} (84%) create mode 100644 packages/material-ui/src/NoSsr/index.d.ts create mode 100644 packages/material-ui/src/NoSsr/index.js create mode 100644 pages/api/no-ssr.js create mode 100644 pages/api/no-ssr.md create mode 100644 pages/utils/no-ssr.js diff --git a/docs/scripts/buildApi.js b/docs/scripts/buildApi.js index 4bd1bcdc397226..0ea69c2b6398a7 100644 --- a/docs/scripts/buildApi.js +++ b/docs/scripts/buildApi.js @@ -134,7 +134,7 @@ function buildDocs(options) { reactAPI.pagesMarkdown = pagesMarkdown; reactAPI.src = src; - // if (reactAPI.name !== 'Snackbar') { + // if (reactAPI.name !== 'NoSsr') { // return; // } diff --git a/docs/src/modules/components/HomeBackers.js b/docs/src/modules/components/HomeBackers.js index 80efa19e29d7bb..bd8453ca2c4fa1 100644 --- a/docs/src/modules/components/HomeBackers.js +++ b/docs/src/modules/components/HomeBackers.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; -import NoSSR from '@material-ui/core/NoSSR'; +import NoSsr from '@material-ui/core/NoSsr'; import MarkdownElement from '@material-ui/docs/MarkdownElement'; const styles = theme => ({ @@ -21,7 +21,7 @@ function HomeBackers(props) { return (
- + - +
); } diff --git a/docs/src/modules/components/HomeSteps.js b/docs/src/modules/components/HomeSteps.js index 729f3e08b38798..a8245e5a7cf62f 100644 --- a/docs/src/modules/components/HomeSteps.js +++ b/docs/src/modules/components/HomeSteps.js @@ -10,7 +10,7 @@ import FileDownloadIcon from '@material-ui/docs/svgIcons/FileDownload'; import BuildIcon from '@material-ui/icons/Build'; // eslint-disable-line import/no-unresolved import WhatshotIcon from '@material-ui/icons/Whatshot'; import MarkdownElement from '@material-ui/docs/MarkdownElement'; -import NoSSR from '@material-ui/core/NoSSR'; +import NoSsr from '@material-ui/core/NoSsr'; import Link from 'docs/src/modules/components/Link'; const styles = theme => ({ @@ -181,9 +181,9 @@ function HomeSteps(props) { our official marketplace—all built on Material-UI.`} - + themes - + diff --git a/docs/src/modules/components/withRoot.js b/docs/src/modules/components/withRoot.js index 71213506810190..6c31abcd444f3d 100644 --- a/docs/src/modules/components/withRoot.js +++ b/docs/src/modules/components/withRoot.js @@ -104,6 +104,10 @@ const pages = [ { pathname: '/utils/click-away-listener', }, + { + pathname: '/utils/no-ssr', + title: 'No SSR', + }, ], }, { diff --git a/docs/src/pages/demos/autocomplete/IntegrationReactSelect.js b/docs/src/pages/demos/autocomplete/IntegrationReactSelect.js index 341c377838aec8..a983450af4f749 100644 --- a/docs/src/pages/demos/autocomplete/IntegrationReactSelect.js +++ b/docs/src/pages/demos/autocomplete/IntegrationReactSelect.js @@ -6,7 +6,7 @@ import classNames from 'classnames'; import Select from 'react-select'; import { withStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; -import NoSSR from '@material-ui/core/NoSSR'; +import NoSsr from '@material-ui/core/NoSsr'; import TextField from '@material-ui/core/TextField'; import Chip from '@material-ui/core/Chip'; import MenuItem from '@material-ui/core/MenuItem'; @@ -205,7 +205,7 @@ class IntegrationReactSelect extends React.Component { return (
- +