Spaces:
Sleeping
Sleeping
File size: 925 Bytes
90cbf22 df2ef4f 90cbf22 ce8b18b 90cbf22 df2ef4f 90cbf22 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import clsx from 'clsx';
import { MouseEventHandler, ReactNode } from 'react';
export default function Button(props: {
className?: string;
href?: string;
imgUrl?: string;
onClick?: MouseEventHandler;
title?: string;
children: ReactNode;
selected?: boolean;
disabled?: boolean;
}) {
return (
<a
className={clsx(
'button text-white bg-clay-700 rounded shadow-solid text-xl pointer-events-auto',
props.className,
props.selected && 'button-selected',
props.disabled && 'disabled',
)}
href={props.href}
title={props.title}
onClick={props.onClick}
>
<div className="w-full bg-clay-700">
<div className="flex justify-center items-center h-full w-full gap-5">
{props.imgUrl && <img className="w-4 h-4 sm:w-[30px] sm:h-[30px]" src={props.imgUrl} />}
{props.children}
</div>
</div>
</a>
);
}
|