Skip to content

Commit

Permalink
[docs] Add Diamond Sponsors
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 7, 2019
1 parent 0ae930e commit 7f0df1b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/modules/components/AppDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import SwipeableDrawer from '@material-ui/core/SwipeableDrawer';
import Divider from '@material-ui/core/Divider';
import Hidden from '@material-ui/core/Hidden';
import AppDrawerNavItem from 'docs/src/modules/components/AppDrawerNavItem';
import DiamondSponsors from 'docs/src/modules/components/DiamondSponsors';
import Link from 'docs/src/modules/components/Link';
import { pageToTitleI18n } from 'docs/src/modules/utils/helpers';
import PageContext from 'docs/src/modules/components/PageContext';
Expand Down Expand Up @@ -160,6 +161,7 @@ function AppDrawer(props) {
</div>
</div>
<Divider />
<DiamondSponsors />
{renderNavItems({ props, pages, activePage, depth: 0, t })}
</PersistScroll>
);
Expand Down
54 changes: 54 additions & 0 deletions docs/src/modules/components/DiamondSponsors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* eslint-disable material-ui/no-hardcoded-labels */
import React from 'react';
import Typography from '@material-ui/core/Typography';
import Box from '@material-ui/core/Box';
import { makeStyles } from '@material-ui/core/styles';
import AddIcon from '@material-ui/icons/Add';

const useStyles = makeStyles(theme => ({
root: {
'& a': {
display: 'block',
marginTop: theme.spacing(1),
},
'& img': {
width: 125,
},
},
placeholder: {
width: 125,
height: 35,
alignItems: 'center',
justifyContent: 'center',
borderRadius: theme.shape.borderRadius,
color: theme.palette.divider,
border: `1px dashed ${theme.palette.divider}`,
transition: theme.transitions.create(['color', 'border-color']),
'&&': {
display: 'flex',
},
'&:hover': {
borderColor: 'currentColor',
color: theme.palette.text.secondary,
},
},
}));

export default function DiamondSponsors() {
const classes = useStyles();
return (
<Box mx={3} my={2} className={classes.root}>
<Typography variant="caption" color="textSecondary" display="block">
Diamond Sponsors
</Typography>
<a
className={classes.placeholder}
rel="noopener noreferrer"
target="_blank"
href="https://www.patreon.com/oliviertassinari"
>
<AddIcon />
</a>
</Box>
);
}

0 comments on commit 7f0df1b

Please sign in to comment.