habra.
  • Introduction
  • Extensions
  • Contributing
  • 🚀Self-host
    • Cloning and installation
    • Running
  • 📂structure
    • How it renders
    • Styles
    • Redux store
    • Routing
    • Locales
Powered by GitBook
On this page

Was this helpful?

  1. structure

Styles

PreviousHow it rendersNextRedux store

Last updated 4 years ago

Was this helpful?

We use component library to get the Material Design look. This framework uses CSS-in-JS technique, so to stylize components you have to do the following:

// Import makeStyles from material-ui
import { makeStyles } from '@material-ui/core/styles/'

// Make a hook for using styles
const useStyles = makeStyles(() => ({
    root: { ... },
    headerTitle: { ... }
})

const App = () => {
    // Get class names
    const classes = useStyles()
    
    return (
        <Container className={classes.root}>
            <Typography variant="h1" className={classes.headerTitle}>
                Title
            </Typography>
        </Container>
    )
}

MUI about styling -

📂
Material-UI
click