Skip to main content

Posts

Showing posts with the label material UI

material UI - responsive

< Hidden mdDown > < strong > Hi, { profile && profile . firstName } </ strong > </ Hidden > < Person className = { classes . icons } /> < Hidden mdUp implementation = 'css' > < p className = { classes . linkText } > { profile && profile . firstName } </ p > </ Hidden >

use hooks - useTheme in Material UI

contactPage.js import { useTheme } from '@material-ui/core/styles' const useStyles = makeStyles ( styles ) export default function ContactList () { const theme = useTheme () ... < TableCell > < strong style = { { color: theme . palette . primary . main } } > { name } </ strong > index.js import { ThemeProvider } from '@material-ui/styles' import { createMuiTheme } from '@material-ui/core/styles' import { green , orange , red , blue } from '@material-ui/core/colors' const theme = createMuiTheme ({ palette: { primary: blue , secondary: orange }, status: { danger: red } }) ... ReactDOM . render ( < ApolloProvider client = { client } > < StateProvider > < ThemeProvider theme = { theme } > < Router history = { hist } > < Sw...

Styled Components - along with Material-UI

This guide aims to document the most popular alternatives, but you should find that the principals applied here can be adapted to other libraries. There are examples for the following styling solutions: https://material-ui.com/guides/interoperability/ Plain CSS Global CSS Styled Components CSS Modules Emotion React JSS Glamor https://emotion.sh/docs/styled