1
0
mirror of synced 2025-12-21 02:46:50 -05:00
Files
docs/components/article/LearningTrackNav.tsx
Kevin Heis 9f7c20dae8 Upgrade Primer CSS to version 17, removing marketing styles (#20965)
* Package updates

* Fix up things that look broken

* Add to utils

* Lead now just sets font size, just use f3 where needed

* Update package-lock.json

* Update index.tsx

* Delete bump-link.scss

* Update trigger-error.js

* Update components/GenericError.tsx

Co-authored-by: Ash Guillaume <10384315+ashygee@users.noreply.github.com>

* Update ArticlePage.tsx

* Update ActionBar.tsx

* Changes from meeting

* Found a few more monos

* Fix from a merge conflict

* Missed a few f3s

* Update SubLandingHero.tsx

* Bye gradients

* Match up breadcrumbs

* Update SubLandingHero.tsx

* Update lists.scss

Co-authored-by: Ash Guillaume <10384315+ashygee@users.noreply.github.com>
2021-08-31 14:49:39 -07:00

45 lines
1.3 KiB
TypeScript

import type { LearningTrack } from 'components/context/ArticleContext'
import { useTranslation } from 'components/hooks/useTranslation'
type Props = {
track: LearningTrack
}
export function LearningTrackNav({ track }: Props) {
const { t } = useTranslation('learning_track_nav')
const { prevGuide, nextGuide, trackName } = track
return (
<div
data-testid="learning-track-nav"
className="py-3 px-4 rounded color-bg-primary border d-flex flex-justify-between"
>
<span className="d-flex flex-column">
{prevGuide && (
<>
<span className="f6 color-text-secondary">{t('prevGuide')}</span>
<a
href={`${prevGuide.href}?learn=${trackName}`}
className="text-bold color-text-secondary"
>
{prevGuide.title}
</a>
</>
)}
</span>
<span className="d-flex flex-column flex-items-end">
{nextGuide && (
<>
<span className="f6 color-text-secondary">{t('nextGuide')}</span>
<a
href={`${nextGuide.href}?learn=${trackName}`}
className="text-bold color-text-secondary text-right f4"
>
{nextGuide.title}
</a>
</>
)}
</span>
</div>
)
}