Pagination

The Pagination component can be used to render links to the previous and next routes, typically at the bottom of the main content.

// example Root component
import React from 'react'
import {
  Layout,
  NavLinks,
  Pagination
} from 'mdx-go'

export const Root = props =>
  <Layout>
    <Layout.Sidebar>
      <NavLinks {...props} />
    </Layout.Sidebar>
    <Layout.Main>
      {props.children}
      <Pagination {...props} />
    </Layout.Main>
  </Layout>

Props

PropTypeDescription
routesarray (required)Array of mdx-go route objects passed to the Root component
orderarrayArray of route names to sort the links
filterfunctionOptional function to filter routes
fontSizenumber, string, or arrayChanges the links' font size
colorstringChanges the links' color
bgstringChanges the links' background color
cssobject or stringAdditional CSS to pass to the links
spacenumber, string, or arrayAll styled-system space props are passed to the links