Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Try CodeFund over Carbon #12484

Merged
merged 1 commit into from
Aug 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/modules/components/AppContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const styles = theme => ({
[theme.breakpoints.up('sm')]: {
paddingLeft: theme.spacing.unit * 4,
paddingRight: theme.spacing.unit * 4,
maxWidth: 'calc(100% - 160px)',
maxWidth: 'calc(100% - 162px)',
},
[theme.breakpoints.up('lg')]: {
paddingLeft: theme.spacing.unit * 5,
paddingRight: theme.spacing.unit * 9,
maxWidth: 'calc(100% - 240px - 160px)',
maxWidth: 'calc(100% - 240px - 162px)',
},
},
});
Expand Down
14 changes: 10 additions & 4 deletions docs/src/modules/components/AppTableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import EventListener from 'react-event-listener';
import { withStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import { textToHash } from '@material-ui/docs/MarkdownElement/MarkdownElement';
import CodeFund from 'docs/src/modules/components/CodeFund';

const renderer = new marked.Renderer();

Expand Down Expand Up @@ -39,7 +40,7 @@ renderer.heading = (text, level) => {
const styles = theme => ({
root: {
top: 70,
width: 160,
width: 162,
flexShrink: 0,
order: 2,
position: 'sticky',
Expand All @@ -53,6 +54,9 @@ const styles = theme => ({
display: 'block',
},
},
contents: {
marginTop: theme.spacing.unit * 2,
},
ul: {
padding: 0,
margin: 0,
Expand All @@ -67,7 +71,7 @@ const styles = theme => ({
class AppTableOfContents extends React.Component {
handleScroll = debounce(() => {
this.findActiveIndex();
}, 166); // Corresponds to 10 frames at 60 Hz.
}, 83); // Corresponds to 5 frames at 60 Hz.

constructor(props) {
super(props);
Expand Down Expand Up @@ -122,14 +126,15 @@ class AppTableOfContents extends React.Component {
};

render() {
const { classes } = this.props;
const { classes, disableAd } = this.props;
const { active } = this.state;

return (
<nav className={classes.root}>
{disableAd ? null : <CodeFund />}
{itemsServer.length > 0 ? (
<React.Fragment>
<Typography variant="body2" gutterBottom>
<Typography variant="body2" gutterBottom className={classes.contents}>
Contents
</Typography>
<EventListener target="window" onScroll={this.handleScroll} />
Expand Down Expand Up @@ -178,6 +183,7 @@ class AppTableOfContents extends React.Component {
AppTableOfContents.propTypes = {
classes: PropTypes.object.isRequired,
contents: PropTypes.array.isRequired,
disableAd: PropTypes.bool.isRequired,
};

export default withStyles(styles)(AppTableOfContents);
189 changes: 0 additions & 189 deletions docs/src/modules/components/Carbon.js

This file was deleted.

Loading