Is "theme" global object available in all files in Material-ui?
I have been following Material-UI tutorial to learn Material-UI. At 9:25 it passes "theme" to makeStyles function. My question is "How is theme object's values are available there just so? such that they can be accessed in the subsequent body like theme.breakpoints.down("sm") for example.That "theme" is not defined so far in the file. I tried reading the documentation and it mentions nothing about it quite right. makestyles documentation.Can somebody explain to me what is happening there?
Material UI has a function called
createMuiThemeand the main purpose of it, is to create a
muiTheme, deep merging defaults with user custom theme options and store it in
makeStylesfunction it simply import that
hope this would be helpful