Skip to content

Commit

Permalink
fix: use the footer somewhere else than in example
Browse files Browse the repository at this point in the history
  • Loading branch information
elevatebart committed Sep 7, 2020
1 parent 907271f commit 9a802c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import PropTypes from 'prop-types'
import Markdown from 'rsg-components/Markdown'
import Styled from 'rsg-components/Styled'

const styles = ({ fontFamily, color }: Rsg.Theme) => ({
const styles = ({ fontFamily, fontSize, color }: Rsg.Theme) => ({
root: {
display: 'block',
color: color.light,
fontFamily,
fontSize: 12
fontFamily: fontFamily.base,
fontSize: fontSize.small
}
})

Expand All @@ -24,7 +24,7 @@ export const StyleguideFooterRenderer: React.FC<StyleguideFooterRendererProps> =
}) => {
return (
<footer className={classes.root}>
<Markdown text={`Generated with [Vue Styleguidist](${homepageUrl}) ❤️`} />
<Markdown text={`Generated with [Vue Styleguidist](${homepageUrl})`} />
</footer>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react'
import PropTypes from 'prop-types'
import Logo from 'rsg-components/Logo'
import Markdown from 'rsg-components/Markdown'
import StyleguideFooter from 'rsg-components/StyleguideFooter'
import Styled from 'rsg-components/Styled'
import cx from 'classnames'
import Ribbon from 'rsg-components/Ribbon'
import Version from 'rsg-components/Version'
import { HOMEPAGE } from '../../../scripts/consts'

const styles = ({ color, fontFamily, fontSize, sidebarWidth, mq, space, maxWidth }) => ({
const styles = ({ color, sidebarWidth, mq, space, maxWidth }) => ({
root: {
minHeight: '100vh',
backgroundColor: color.baseBackground
Expand Down Expand Up @@ -49,12 +49,6 @@ const styles = ({ color, fontFamily, fontSize, sidebarWidth, mq, space, maxWidth
logo: {
padding: space[2],
borderBottom: [[1, color.border, 'solid']]
},
footer: {
display: 'block',
color: color.light,
fontFamily: fontFamily.base,
fontSize: fontSize.small
}
})

Expand All @@ -63,9 +57,7 @@ export function StyleGuideRenderer({ classes, title, version, children, toc, has
<div className={cx(classes.root, hasSidebar && classes.hasSidebar)}>
<main className={classes.content}>
{children}
<footer className={classes.footer}>
<Markdown text={`Generated with [Vue Styleguidist](${HOMEPAGE})`} />
</footer>
<StyleguideFooter homepageUrl={HOMEPAGE} />
</main>
{hasSidebar && (
<div className={classes.sidebar}>
Expand Down

0 comments on commit 9a802c8

Please sign in to comment.