Spaces:
Runtime error
Runtime error
File size: 783 Bytes
cd6f98e |
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 |
import clsx from "clsx";
import React from "react";
import Ping from "./Ping";
type WindowButtonProps = {
ping?: boolean; // Toggles the ping animation
onClick?: () => void;
icon: React.ReactNode;
text: string;
border?: boolean;
};
const WindowButton = ({ ping, onClick, icon, text, border }: WindowButtonProps) => {
return (
<div
className={clsx(
"relative flex h-8 cursor-pointer items-center gap-2 rounded-lg bg-slate-1 p-2 font-mono text-sm font-bold text-slate-12 transition-all hover:bg-slate-3",
!border && "rounded-none border-none"
)}
onClick={onClick}
>
{ping ? <Ping color="blue" /> : <></>}
{icon}
<p className="text-gray/50 font-mono">{text}</p>
</div>
);
};
export default WindowButton;
|