Files
cursor-byok/apps/desktop/src/shared/ui/Button.tsx
T
leookun a5bbe67845 refactor: replace Button with TruncatedButton in CursorModelCards and PluginManagementPage
- Updated the UI components in CursorModelCards and PluginManagementPage to use TruncatedButton for better text handling and display.
- Adjusted styles in CursorSettings and PluginManagementPage to ensure proper button layout and responsiveness.
- Added new ActionMenu component for handling additional actions in PluginManagementPage.
- Enhanced localization files to include new strings for the ActionMenu and TruncatedButton components.
2026-08-30 20:45:27 +08:00

25 lines
572 B
TypeScript

import type { ComponentProps } from "react";
import controls from "./Controls.module.scss";
export type ButtonVariant = "primary" | "secondary";
export type ButtonSize = "medium" | "small";
export function Button({
variant = "secondary",
size = "medium",
className,
type = "button",
...props
}: ComponentProps<"button"> & {
variant?: ButtonVariant;
size?: ButtonSize;
}) {
return (
<button
{...props}
type={type}
className={[controls[variant], size === "small" && controls.small, className].filter(Boolean).join(" ")}
/>
);
}