1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Files
docs/components/page-footer/Contribution.tsx
Mike Surowiec a511c95c7f SCSS and Component cleanup (pt 1) (#20572)
* turn article.scss into a module + componentized

* Update Survey to use only component styles, add cancel button

* Update GenericError + 404 page to use only standard classes

* update LearningTrack to not use markdown-body

* remove / consolidate stylesheets

* cleanup Graphiql explorer page and scss

* Componentize Breadcrumb styles

* Componentize DeprecationBanner styles

* scope h2 a link style to markdown-body

* cleanup nav, organize page-header and page-footer components

* remove unused scroll-button.scss

* organize LanguagePicker and ProductPicker

* add declarations file

* remove featured-links.scss, update tests

* update list utility and toc test

* fix bad merge resolution

* update breadcrumbs test
2021-07-29 17:27:20 +00:00

34 lines
1.0 KiB
TypeScript

import { GitPullRequestIcon } from '@primer/octicons-react'
import { useMainContext } from 'components/context/MainContext'
import { useTranslation } from 'components/hooks/useTranslation'
export const Contribution = () => {
const { relativePath } = useMainContext()
const { t } = useTranslation('contribution_cta')
const contributionHref = relativePath
? `https://github.com/github/docs/edit/main/content/${relativePath}`
: 'https://github.com/github/docs'
return (
<div className="f5 contribution">
<h2 className="f4">{t`title`}</h2>
<p className="color-text-secondary f6">{t`body`}</p>
<a className="btn btn-outline" href={contributionHref}>
<GitPullRequestIcon size="small" className="octicon mr-1" />
{t`button`}
</a>
<p className="color-text-secondary f6 mt-2">
{t`or`}{' '}
<a
href="https://github.com/github/docs/blob/main/CONTRIBUTING.md"
target="_blank"
rel="noopener"
>
{t`to_guidelines`}
</a>
</p>
</div>
)
}