@material-ui/core/#createMuiTheme JavaScript Examples
The following examples show how to use
@material-ui/core/#createMuiTheme.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HomePage.js From youtube-clone with MIT License | 5 votes |
HomePage = () => {
const recommendedVids = useSelector(({ videos }) => videos.recommended);
const trendingVids = useSelector(({ videos }) => videos.trending);
const isLoading = useSelector(({ videos }) => videos.isLoading);
const dispatch = useDispatch();
useEffect(() => {
dispatch(getHomeVideos());
}, []);
const classes = useStyles();
let theme = createMuiTheme();
theme = responsiveFontSizes(theme);
return (
<div>
<Banner closeable>
<div className={classes.banner}>
<img
className={classes.bannerImg}
alt="youtube icon"
src={youtubeIcon}
/>
<div>
<ThemeProvider theme={theme}>
<Typography variant="h2"> FullStack Clone</Typography>
<Typography variant="h4">
<a
style={{
color: "red",
}}
href="https://github.com/smfils1/youtube-clone"
>
GitHub Repo
</a>
</Typography>
<Typography variant="body2">
* for Educational Purposes
</Typography>
</ThemeProvider>
</div>
</div>
</Banner>
<Container maxWidth="xl" className={classes.root}>
<Typography variant="h5" className={classes.text}>
Recommended
</Typography>
<VideoGrid
type="vertical_2"
isLoading={isLoading}
videos={recommendedVids}
/>
<Divider light className={classes.divider} />
<Typography variant="h5" className={classes.text}>
Trending
</Typography>
<VideoGrid
type="vertical_2"
isLoading={isLoading}
videos={trendingVids}
/>
</Container>
</div>
);
}