You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ThemeProvider.tsx
// DOC: https://material-ui.com/customization/themes/
import * as React from 'react'
import { createMuiTheme } from '@material-ui/core'
import indigo from '@material-ui/core/colors/indigo'
import pink from '@material-ui/core/colors/pink'
import red from '@material-ui/core/colors/red'
import MUIStylesProvider from '@material-ui/styles/ThemeProvider'
// tslint:disable object-literal-sort-keys
const theme = createMuiTheme({
palette: {
type: 'dark',
primary: indigo,
secondary: pink,
error: red,
// Used by `getContrastText()` to maximize the contrast between the background and
// the text.
contrastThreshold: 3,
// Used to shift a color's luminance by approximately
// two indexes within its tonal palette.
// E.g., shift from Red 500 to Red 300 or Red 700.
tonalOffset: 0.2,
},
spacing: 4,
typography: {
useNextVariants: true,
},
})
// tslint:enable object-literal-sort-keys
// DOC: https://material-ui.com/customization/themes/#muithemeprovider
const ThemeProvider = ({children}: {children: React.ReactChild}) => <MUIStylesProvider theme={theme}>
{children}
</MUIStylesProvider>
export default ThemeProvider
// Home.tsx
import * as React from 'react'
import * as S from './Home.css'
import { Paper } from '_modules/skylo/mui/'
import Logo from './Logo'
function HomeEntrancePage() {
return (
<div className={S.container}>
<Paper />
</div>
)
}
export default HomeEntrancePage
Context 🔦
Your Environment 🌎
Tech
Version
Material-UI
4.0.0-alpha.0
React
16.8.1
Browser
Chrome
TypeScript
3.3.1
etc.
999.999.999
The text was updated successfully, but these errors were encountered:
Might be related to
#14152
Expected Behavior 🤔
Trying to render the Paper example w/ the styles/ThemeProvider in 4.0.0
Current Behavior 😯
Steps to Reproduce 🕹
Adding material ui to a project initialized with https://github.com/TGRstack/typescript-graphql-react-app-express
Context 🔦
Your Environment 🌎
The text was updated successfully, but these errors were encountered: