1
0
mirror of synced 2026-01-06 06:02:35 -05:00
Files
docs/components/page-footer/Contribution.tsx
Kevin Heis 567652b0e3 Primer 18 b (#22462)
* Create migrate-colors-primer-18.js

* Update colors round 1

* upgrade primer packages

* Update index.scss

* Replace auto colors

* remove btn-primary-matte

* Turns out the class names and variables names DONT LINE UP... ugh....

* Check for allowed var colors
2021-10-28 19:17:23 +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 mb-3">{t`title`}</h2>
<p className="max-w-xs color-fg-muted mb-3">{t`body`}</p>
<a className="btn" href={contributionHref}>
<GitPullRequestIcon size="small" className="octicon mr-1" />
{t`button`}
</a>
<p className="color-fg-muted 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>
)
}