2023-10-23 23:33:39 +02:00
|
|
|
import classNames from "clsx"
|
2021-10-24 06:09:43 +02:00
|
|
|
|
|
|
|
export interface IconButtonProps
|
2023-10-23 23:33:39 +02:00
|
|
|
extends React.ComponentPropsWithoutRef<"button"> {}
|
2021-10-24 06:09:43 +02:00
|
|
|
|
|
|
|
export const IconButton: React.FC<IconButtonProps> = (props) => {
|
|
|
|
const { children, className, ...rest } = props
|
|
|
|
|
|
|
|
return (
|
|
|
|
<button
|
|
|
|
className={classNames(
|
2023-10-23 23:33:39 +02:00
|
|
|
"flex items-center justify-center text-center text-green-800 hover:animate-pulse focus:animate-pulse focus:outline-none dark:text-green-400",
|
|
|
|
className,
|
2021-10-24 06:09:43 +02:00
|
|
|
)}
|
|
|
|
{...rest}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</button>
|
|
|
|
)
|
|
|
|
}
|