mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-13 23:12:16 +00:00
feat(frontend): Implement notification settings with separate drawers and improved design.
- Add shadcn/ui drawer and switch components - Create NotificationFiltersDrawer for editing notification filters - Create DiscordConfigDrawer with test functionality - Create TelegramConfigDrawer with test functionality - Add reusable EditButton component for consistent design language - Refactor Settings page to use separate drawers per configuration type - Remove test notifications card, integrate testing into service drawers - Simplify notification service status indicators for cleaner UI - Remove redundant service descriptions for streamlined layout 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
39
frontend/src/components/ui/edit-button.tsx
Normal file
39
frontend/src/components/ui/edit-button.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Edit3 } from "lucide-react";
|
||||
import { Button } from "./button";
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
interface EditButtonProps {
|
||||
onClick?: () => void;
|
||||
disabled?: boolean;
|
||||
className?: string;
|
||||
size?: "default" | "sm" | "lg" | "icon";
|
||||
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export function EditButton({
|
||||
onClick,
|
||||
disabled = false,
|
||||
className,
|
||||
size = "sm",
|
||||
variant = "outline",
|
||||
children,
|
||||
...props
|
||||
}: EditButtonProps) {
|
||||
return (
|
||||
<Button
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
size={size}
|
||||
variant={variant}
|
||||
className={cn(
|
||||
"h-8 px-3 text-muted-foreground hover:text-foreground transition-colors",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<Edit3 className="h-4 w-4" />
|
||||
<span className="ml-2">{children || "Edit"}</span>
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user