mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 01:01:38 +00:00
* switch database to mysql * add find user api * add RUAInput compoent * update RUAButton onClick * refactor user api * add login form
28 lines
651 B
TypeScript
28 lines
651 B
TypeScript
import { FC, MouseEventHandler } from 'react';
|
|
import cn from 'classnames';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
onClick?: MouseEventHandler<HTMLButtonElement> | undefined;
|
|
}
|
|
|
|
const RUAButton: FC<Props> = ({ className, children, onClick }) => {
|
|
return (
|
|
<>
|
|
<button
|
|
className={cn(
|
|
'rounded-lg bg-white px-6 py-3 font-semibold',
|
|
'focus:shadow-outline active:bg-gray-100 transition-all',
|
|
'dark:text-gray-400 dark:bg-rua-gray-800 dark:active:bg-gray-600',
|
|
className
|
|
)}
|
|
onClick={onClick}
|
|
>
|
|
{children}
|
|
</button>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default RUAButton;
|