All files / src/components page-footer.js

100% Statements 2/2
100% Branches 8/8
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30            5x                                   1x          
import {BorderBox, Grid, StyledOcticon, Link} from '@primer/components'
import {PencilIcon} from '@primer/octicons-react'
import React from 'react'
import Contributors from './contributors'
 
function PageFooter({editUrl, contributors}) {
  return editUrl || contributors.length > 0 ? (
    <BorderBox borderWidth={0} borderTopWidth={1} mt={8} py={5}>
      <Grid gridGap={4}>
        {editUrl ? (
          <Link href={editUrl}>
            <StyledOcticon icon={PencilIcon} mr={2} />
            Edit this page on GitHub
          </Link>
        ) : null}
 
        {contributors.length > 0 ? (
          <Contributors contributors={contributors} />
        ) : null}
      </Grid>
    </BorderBox>
  ) : null
}
 
PageFooter.defaultProps = {
  contributors: [],
}
 
export default PageFooter