feat: support settings on mobile device
This commit is contained in:
parent
476303f52b
commit
99fc130061
3 changed files with 28 additions and 14 deletions
23
ui/components/SettingsEntry.tsx
Normal file
23
ui/components/SettingsEntry.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { useState } from 'react';
|
||||
import { Settings } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import SettingsDialog from './SettingsDialog';
|
||||
|
||||
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
||||
|
||||
const SettingsEntry = ({ className }: InputProps) => {
|
||||
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Settings
|
||||
onClick={() => setIsSettingsOpen(!isSettingsOpen)}
|
||||
className={cn('cursor-pointer', className)}
|
||||
/>
|
||||
|
||||
<SettingsDialog isOpen={isSettingsOpen} setIsOpen={setIsSettingsOpen} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default SettingsEntry;
|
Loading…
Add table
Add a link
Reference in a new issue