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?

1 answer