mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-05-18 15:26:36 +00:00
refactor(settings-button): integrate settings dialog state with store
This commit is contained in:
parent
efa16c8b77
commit
83356993e9
@ -9,17 +9,18 @@ import {
|
||||
import { cn } from "@/lib/utils";
|
||||
import { SettingsIcon } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useSettingsStore } from "@/store/useSettingsStore";
|
||||
|
||||
interface SettingsButtonProps {
|
||||
className?: string;
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
export default function SettingsButton({
|
||||
className,
|
||||
onClick,
|
||||
...props
|
||||
}: SettingsButtonProps) {
|
||||
const { setDialogOpen } = useSettingsStore();
|
||||
|
||||
return (
|
||||
<TooltipProvider delayDuration={0}>
|
||||
<Tooltip>
|
||||
@ -27,7 +28,7 @@ export default function SettingsButton({
|
||||
<Button
|
||||
variant="ghost"
|
||||
className={cn("h-8 w-auto p-2", className)}
|
||||
onClick={onClick}
|
||||
onClick={() => setDialogOpen(true)}
|
||||
{...props}
|
||||
>
|
||||
<SettingsIcon size={16} aria-hidden="true" />
|
||||
|
Loading…
Reference in New Issue
Block a user