-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/mock_unit_tests
- Loading branch information
Showing
7 changed files
with
74 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/interfaces/assistants_web/src/components/UI/ShowCitationsToggle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Switch, Text } from '@/components/UI'; | ||
import { useSettingsStore } from '@/stores'; | ||
|
||
export const ShowCitationsToggle = () => { | ||
const { showCitations, setShowCitations } = useSettingsStore(); | ||
|
||
const handleSwitchShowCitations = (checked: boolean) => { | ||
setShowCitations(checked); | ||
}; | ||
|
||
return ( | ||
<section className="mb-4 flex gap-6"> | ||
<Text styleAs="label" className="font-medium"> | ||
Show citations | ||
</Text> | ||
<Switch | ||
checked={showCitations} | ||
onChange={(checked: boolean) => handleSwitchShowCitations(checked)} | ||
showCheckedState | ||
/> | ||
</section> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters