1
0
mirror of synced 2025-12-19 09:57:42 -05:00
Files
docs/components/page-footer/Contribution.tsx
2023-09-21 17:06:57 +00:00

35 lines
1.1 KiB
TypeScript

import { GitPullRequestIcon } from '@primer/octicons-react'
import { useMainContext } from 'components/context/MainContext'
import { useTranslation } from 'src/languages/components/useTranslation'
export const Contribution = () => {
const { relativePath } = useMainContext()
const { t } = useTranslation('contribution_cta')
const contributionHref = relativePath
? `https://github.com/github/docs/blob/main/content/${relativePath}`
: 'https://github.com/github/docs'
return (
<div className="f5 contribution">
<h3 className="f4 mb-3">{t`title`}</h3>
<p className="max-w-xs color-fg-muted mb-3">{t`body`}</p>
<a className="btn color-border-accent-emphasis" href={contributionHref}>
<GitPullRequestIcon size="small" className="octicon mr-1" />
{t`button`}
</a>
<p className="color-fg-muted f6 mt-2">
<a
className="text-underline"
href="/contributing"
target="_blank"
rel="noopener"
>
{t`to_guidelines`}
</a>
</p>
</div>
)
}