Skip to content

Commit

Permalink
fix(styleguiderenderer): pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
theetrain committed Jan 12, 2018
1 parent 33aa9f4 commit fcd6ec5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ coverage

# TDS build artifacts
dist
/styleguide
guide/components/
_book
build
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'
import PropTypes from 'prop-types'
import Logo from '../Logo/Logo.jsx'
import Markdown from '../Markdown/Markdown.js'
import Styled from 'rsg-components/Styled'
import Styled from 'react-styleguidist/lib/rsg-components/Styled'
import cx from 'classnames'
import Logo from '../Logo/Logo'
import Markdown from '../Markdown/Markdown'

const styles = ({ color, fontFamily, fontSize, sidebarWidth, mq, space, maxWidth }) => ({
root: {
Expand Down Expand Up @@ -57,7 +57,7 @@ const styles = ({ color, fontFamily, fontSize, sidebarWidth, mq, space, maxWidth
export function StyleGuideRenderer({ classes, title, homepageUrl, children, toc, hasSidebar }) {
return (
<div className={cx(classes.root, hasSidebar && classes.hasSidebar)}>
<a id="styleguidist-top" />
<a id="styleguidist-top">&nbsp;</a>
<main className={classes.content}>
{children}
<footer className={classes.footer}>
Expand Down Expand Up @@ -85,4 +85,8 @@ StyleGuideRenderer.propTypes = {
hasSidebar: PropTypes.bool,
}

StyleGuideRenderer.defaultProps = {
hasSidebar: undefined,
}

export default Styled(styles)(StyleGuideRenderer)

0 comments on commit fcd6ec5

Please sign in to comment.