Files
cstb-next/src/components/window/ToolButton.tsx

18 lines
490 B
TypeScript
Raw Normal View History

2024-11-11 10:04:00 +08:00
import type { ReactNode } from "react"
2024-09-21 00:25:31 +08:00
2024-11-11 10:04:00 +08:00
interface ToolButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
children?: ReactNode
2024-09-21 00:25:31 +08:00
}
export const ToolButton = ({ children, ...rest }: ToolButtonProps) => {
2024-11-11 10:04:00 +08:00
return (
<button
type="button"
className="flex gap-0.5 active:scale-95 items-center min-w-7 justify-center px-2 py-1.5 bg-black/5 transition hover:bg-black/10 rounded-md text-sm leading-none"
{...rest}
>
{children}
</button>
)
}