-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(pages): add navigation footer (#3577)
* docs(Shorthand|Theming): rework docs to be more actual * remove extension * docs(pages): aff navigation footer
- Loading branch information
1 parent
909e077
commit ffa3874
Showing
9 changed files
with
66 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
docs/src/components/DocumentationPage/DocumentationPageFooter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import PropTypes from 'prop-types' | ||
import React, { Fragment } from 'react' | ||
import { Link } from 'react-static' | ||
import { Divider, Grid, Header } from 'semantic-ui-react' | ||
|
||
const DocumentationPageFooter = ({ nextPage, prevPage }) => | ||
nextPage || prevPage ? ( | ||
<Fragment> | ||
<Divider /> | ||
|
||
<Grid columns={2}> | ||
<Grid.Column> | ||
{prevPage && ( | ||
<Header | ||
as={Link} | ||
content={prevPage.title} | ||
subheader='Previous page' | ||
to={prevPage.href} | ||
/> | ||
)} | ||
</Grid.Column> | ||
<Grid.Column textAlign='right'> | ||
{nextPage && ( | ||
<Header as={Link} content={nextPage.title} subheader='Next page' to={nextPage.href} /> | ||
)} | ||
</Grid.Column> | ||
</Grid> | ||
</Fragment> | ||
) : null | ||
|
||
DocumentationPageFooter.propTypes = { | ||
nextPage: PropTypes.shape({ title: PropTypes.string, href: PropTypes.string }), | ||
prevPage: PropTypes.shape({ title: PropTypes.string, href: PropTypes.string }), | ||
} | ||
|
||
export default DocumentationPageFooter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters