A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
TypeScript amazon-primeelectronepic-games-launcherepic-games-storeepic-storegaminggoggog-galaxyheroic-games-launcherlinuxplay-gamesprotonsteamwine
import { ArrowLeft } from 'lucide-react'
import classNames from 'classnames'
import { NavLink } from 'react-router-dom'
import Icon from '../Icon'
import './index.css'
interface BackButtonProps {
to: string
label: string
iconOnly?: boolean
className?: string
}
export default function BackButton({
to,
label,
iconOnly = false,
className
}: BackButtonProps) {
return (
<NavLink
to={to}
title={label}
aria-label={iconOnly ? label : undefined}
className={classNames(
'BackButton',
{ 'BackButton--iconOnly': iconOnly },
className
)}
>
<Icon glyph={ArrowLeft} size="md" />
{!iconOnly && <span className="BackButton__label">{label}</span>}
</NavLink>
)
}