May 2018
Intermediate to advanced
470 pages
13h 54m
English
After the imports, we will define CSS styles utilizing the Material-UI theme variables as required to style the elements in the component. For the Home component in Home.js, we have the following styles.
mern-skeleton/client/core/Home.js:
const styles = theme => ({ card: { maxWidth: 600, margin: 'auto', marginTop: theme.spacing.unit * 5 }, title: { padding:`${theme.spacing.unit * 3}px ${theme.spacing.unit * 2.5}px ${theme.spacing.unit * 2}px`, color: theme.palette.text.secondary }, media: { minHeight: 330 }})
The JSS style objects defined here will be injected into the component and used to style the elements in the component, as shown in the following Home component definition.
Read now
Unlock full access