mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-05 20:44:07 +08:00
- 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.
25 lines
572 B
TypeScript
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(" ")}
|
|
/>
|
|
);
|
|
}
|