UNPKG

@newrelic/gatsby-theme-newrelic

Version:

[![Community Project header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Project.png)](https://opensource.newrelic.com/oss-category/#community-project)

45 lines (40 loc) 1.12 kB
import React from 'react'; import PropTypes from 'prop-types'; import { css } from '@emotion/react'; import Button from './Button'; import PageTools from './PageTools'; import EditPageButton from './EditPageButton'; import useLocale from '../hooks/useLocale'; const ContributingGuidelines = ({ className, fileRelativePath }) => { const { locale } = useLocale(); return ( <PageTools.Section className={className} css={css` margin: 0; padding: 0; border: none; `} > {fileRelativePath && locale === 'en' && ( <EditPageButton fileRelativePath={fileRelativePath} variant={Button.VARIANT.OUTLINE} instrumentation={{ component: 'ContributingGuidelines' }} css={css` width: 100%; height: 3rem; &:hover { color: var(--secondary-text-color); } `} /> )} </PageTools.Section> ); }; ContributingGuidelines.propTypes = { className: PropTypes.string, fileRelativePath: PropTypes.string, }; export default ContributingGuidelines;