diff --git a/examples/with-material-ui-next/README.md b/examples/with-material-ui-next/README.md
index b8dc3519..6745543c 100644
--- a/examples/with-material-ui-next/README.md
+++ b/examples/with-material-ui-next/README.md
@@ -1,13 +1,13 @@
-[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-material-ui-next)
+[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/callemall/material-ui/tree/v1-beta/examples/nextjs)
# Material-UI example
## How to use
-Download the example [or clone the repo](https://github.com/zeit/next.js):
+Download the example [or clone the repo](https://github.com/callemall/material-ui):
```bash
-curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-material-ui-next
-cd with-material-ui-next
+curl https://codeload.github.com/callemall/material-ui/tar.gz/v1-beta | tar -xz --strip=2 material-ui-1-beta/examples/nextjs
+cd nextjs
```
Install it and run:
@@ -25,5 +25,7 @@ now
## The idea behind the example
-[material-ui](https://github.com/callemall/material-ui) is being rewritten from scratch on the [next branch](https://material-ui-1dab0.firebaseapp.com/). This example shows how you use it with Next.js.
+[material-ui](https://github.com/callemall/material-ui) is being rewritten from scratch on the [v1-beta branch](https://material-ui-1dab0.firebaseapp.com/).
+This example shows how you use it with Next.js.
+:warning: The source code [is hosted](https://github.com/callemall/material-ui/tree/v1-beta/examples/nextjs) on the Material-UI repository.
diff --git a/examples/with-material-ui-next/components/withRoot.js b/examples/with-material-ui-next/components/withRoot.js
deleted file mode 100644
index 0a1282f1..00000000
--- a/examples/with-material-ui-next/components/withRoot.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import React, { Component } from 'react'
-import { JssProvider } from 'react-jss'
-import { withStyles, MuiThemeProvider } from 'material-ui/styles'
-import { getContext } from '../styles/context'
-
-// Apply some reset
-const styleSheet = theme => ({
- '@global': {
- html: {
- background: theme.palette.background.default,
- WebkitFontSmoothing: 'antialiased', // Antialiasing.
- MozOsxFontSmoothing: 'grayscale' // Antialiasing.
- },
- body: {
- margin: 0
- }
- }
-})
-
-let AppWrapper = props => props.children
-
-AppWrapper = withStyles(styleSheet)(AppWrapper)
-
-function withRoot (BaseComponent) {
- class WithRoot extends Component {
- static getInitialProps (ctx) {
- if (BaseComponent.getInitialProps) {
- return BaseComponent.getInitialProps(ctx)
- }
-
- return {}
- }
-
- componentDidMount () {
- // Remove the server-side injected CSS.
- const jssStyles = document.querySelector('#jss-server-side')
- if (jssStyles && jssStyles.parentNode) {
- jssStyles.parentNode.removeChild(jssStyles)
- }
- }
-
- render () {
- const context = getContext()
-
- return (
-
-
-
-
-
-
-
- )
- }
- }
-
- WithRoot.displayName = `withRoot(${BaseComponent.displayName})`
-
- return WithRoot
-}
-
-export default withRoot
diff --git a/examples/with-material-ui-next/package.json b/examples/with-material-ui-next/package.json
deleted file mode 100644
index bfac72be..00000000
--- a/examples/with-material-ui-next/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "with-material-ui-next",
- "version": "1.0.0",
- "dependencies": {
- "material-ui": "next",
- "next": "latest",
- "react": "^15.5.4",
- "react-dom": "^15.5.4",
- "react-jss": "^7.0.2"
- },
- "scripts": {
- "dev": "next",
- "build": "next build",
- "start": "next start"
- }
-}
diff --git a/examples/with-material-ui-next/pages/_document.js b/examples/with-material-ui-next/pages/_document.js
deleted file mode 100644
index 61e4570d..00000000
--- a/examples/with-material-ui-next/pages/_document.js
+++ /dev/null
@@ -1,47 +0,0 @@
-import React from 'react'
-import Document, { Head, Main, NextScript } from 'next/document'
-import { getContext, setContext } from '../styles/context'
-
-export default class MyDocument extends Document {
- static async getInitialProps (ctx) {
- // Reset the context for handling a new request.
- setContext()
- const page = ctx.renderPage()
- // Get the context with the collected side effects.
- const context = getContext()
- return {
- ...page,
- styles:
- }
- }
-
- render () {
- const context = getContext()
- return (
-
-
- My page
-
- {/* Use minimum-scale=1 to enable GPU rasterization */}
-
- {/* PWA primary color */}
-
-
-
-
-
-
-
-
- )
- }
-}
diff --git a/examples/with-material-ui-next/pages/index.js b/examples/with-material-ui-next/pages/index.js
deleted file mode 100644
index 09068a6c..00000000
--- a/examples/with-material-ui-next/pages/index.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import React, {Component} from 'react'
-import Button from 'material-ui/Button'
-import Dialog, {
- DialogTitle,
- DialogContent,
- DialogContentText,
- DialogActions
-} from 'material-ui/Dialog'
-import Typography from 'material-ui/Typography'
-import withRoot from '../components/withRoot'
-
-const styles = {
- container: {
- textAlign: 'center',
- paddingTop: 200
- }
-}
-
-class Index extends Component {
- state = {
- open: false
- };
-
- handleRequestClose = () => {
- this.setState({
- open: false
- })
- };
-
- handleClick = () => {
- this.setState({
- open: true
- })
- };
-
- render () {
- return (
-
-
- Super Secret Password
-
- 1-2-3-4-5
-
-
- OK
-
-
- Material-UI
- example project
-
- Super Secret Password
-
-
- )
- }
-}
-
-export default withRoot(Index)
diff --git a/examples/with-material-ui-next/styles/context.js b/examples/with-material-ui-next/styles/context.js
deleted file mode 100644
index fae1b4b8..00000000
--- a/examples/with-material-ui-next/styles/context.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import { create } from 'jss'
-import preset from 'jss-preset-default'
-import { SheetsRegistry } from 'react-jss'
-import createPalette from 'material-ui/styles/palette'
-import createMuiTheme from 'material-ui/styles/theme'
-import { purple, green } from 'material-ui/colors'
-import createGenerateClassName from 'material-ui/styles/createGenerateClassName'
-
-const theme = createMuiTheme({
- palette: createPalette({
- primary: purple,
- accent: green
- })
-})
-
-// Configure JSS
-const jss = create(preset())
-jss.options.createGenerateClassName = createGenerateClassName
-
-function createContext () {
- return {
- jss,
- theme,
- // This is needed in order to deduplicate the injection of CSS in the page.
- sheetsManager: new WeakMap(),
- // This is needed in order to inject the critical CSS.
- sheetsRegistry: new SheetsRegistry()
- }
-}
-
-export function setContext () {
- // Singleton hack as there is no way to pass variables from _document.js to pages yet.
- global.__INIT_MATERIAL_UI__ = createContext()
-}
-
-export function getContext () {
- // Make sure to create a new store for every server-side request so that data
- // isn't shared between connections (which would be bad)
- if (!process.browser) {
- return global.__INIT_MATERIAL_UI__
- }
-
- // Reuse context on the client-side
- if (!global.__INIT_MATERIAL_UI__) {
- global.__INIT_MATERIAL_UI__ = createContext()
- }
-
- return global.__INIT_MATERIAL_UI__
-}