mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
* fix: cursor pointer not applying correct in the root component * fix: add cursor-not-allowed to disabled state in SendButton component * feat: update Dropdown to ariakit and changed LLM error's style * feat: switched to ariakit's Dropdown and style improvements * feat: archive updates * refactor: delete conversations in archive * refactor: settings * add cool settings animation * a11y: settings update * style: update settings * style: settings account settings menu; a11y(AccountSettings): switched to AriaKit * a11y: account settings update * style: update my files dialog * fix: tests * chore: remove console.log() --------- Co-authored-by: Danny Avila <danny@librechat.ai>
35 lines
926 B
TypeScript
35 lines
926 B
TypeScript
import { useRecoilState } from 'recoil';
|
|
import { Switch } from '~/components/ui';
|
|
import { useLocalize } from '~/hooks';
|
|
import store from '~/store';
|
|
|
|
export default function HideSidePanelSwitch({
|
|
onCheckedChange,
|
|
}: {
|
|
onCheckedChange?: (value: boolean) => void;
|
|
}) {
|
|
const [hideSidePanel, setHideSidePanel] = useRecoilState<boolean>(store.hideSidePanel);
|
|
const localize = useLocalize();
|
|
|
|
const handleCheckedChange = (value: boolean) => {
|
|
setHideSidePanel(value);
|
|
if (onCheckedChange) {
|
|
onCheckedChange(value);
|
|
}
|
|
};
|
|
|
|
return (
|
|
<div className="flex items-center justify-between">
|
|
<div>{localize('com_nav_hide_panel')}</div>
|
|
|
|
<Switch
|
|
id="hideSidePanel"
|
|
checked={hideSidePanel}
|
|
aria-label="Hide right-most side panel"
|
|
onCheckedChange={handleCheckedChange}
|
|
className="ml-4 mt-2"
|
|
data-testid="hideSidePanel"
|
|
/>
|
|
</div>
|
|
);
|
|
}
|