21 lines
479 B
TypeScript
21 lines
479 B
TypeScript
import { PropsWithChildren } from 'react'
|
|
|
|
interface PrimaryLinkButtonProps {
|
|
href: string
|
|
className?: string
|
|
secondary?: boolean
|
|
}
|
|
|
|
export default function AnchorButton({
|
|
href,
|
|
className: extraClasses = '',
|
|
children,
|
|
secondary = false,
|
|
}: PropsWithChildren<PrimaryLinkButtonProps>) {
|
|
const klass = secondary ? 'secondary-button' : 'primary-button'
|
|
return (
|
|
<a href={href} className={`${klass} text-center ${extraClasses}`}>
|
|
{children}
|
|
</a>
|
|
)
|
|
}
|