feat(Navbar): Add settings entry to navbar

This commit is contained in:
Chuck 2024-06-04 17:25:56 +08:00
parent 99fc130061
commit 23478f002c
2 changed files with 8 additions and 6 deletions

View file

@ -1,16 +1,16 @@
import { useState } from 'react';
import { Settings } from 'lucide-react';
import type { LucideProps } from 'lucide-react';
import { cn } from '@/lib/utils';
import SettingsDialog from './SettingsDialog';
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
const SettingsEntry = ({ className }: InputProps) => {
const SettingsEntry = ({ className, ...restProps }: LucideProps) => {
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
return (
<>
<Settings
{...restProps}
onClick={() => setIsSettingsOpen(!isSettingsOpen)}
className={cn('cursor-pointer', className)}
/>