aboutsummaryrefslogtreecommitdiff
path: root/components/button.tsx
blob: 23201aa2d81c9ee8f45c4bfc7f24b4ffb118721d (plain)
1
2
3
4
5
6
7
8
9
export default function Button(props: {
	text: string;
	href?: string;
	onclick?: () => void;
}) {
	return props.href
		? <a href={props.href} className='button'>{props.text}</a>
		: <button onClick={props.onclick} className='button'>{props.text}</button>;
}