-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add input type to settings to allow users to choose input type
- Loading branch information
1 parent
5ecf1ab
commit 9cc5110
Showing
13 changed files
with
156 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { memo, useContext } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import DropdownSection from '../../components/Dropdown/Section'; | ||
import SectionItem from '../../components/Dropdown/Section/SectionItem'; | ||
import { UIContext } from '../../context/uiContext'; | ||
|
||
type Props = {}; | ||
|
||
const ChatInputTypeDropdown = ({}: Props) => { | ||
const { t } = useTranslation(); | ||
const { chatInputType, setChatInputType } = useContext( | ||
UIContext.ChatInputType, | ||
); | ||
return ( | ||
<div> | ||
<DropdownSection borderBottom> | ||
<SectionItem | ||
label={t('Default')} | ||
index={'default-input'} | ||
isSelected={chatInputType === 'default'} | ||
onClick={() => setChatInputType('default')} | ||
description={t('Recommended: The classic input')} | ||
/> | ||
</DropdownSection> | ||
<DropdownSection> | ||
<SectionItem | ||
label={t('Simplified')} | ||
index={'simple-input'} | ||
isSelected={chatInputType === 'simplified'} | ||
onClick={() => setChatInputType('simplified')} | ||
description={t( | ||
'Fallback: Use if experiencing problems with the default one', | ||
)} | ||
/> | ||
</DropdownSection> | ||
</div> | ||
); | ||
}; | ||
|
||
export default memo(ChatInputTypeDropdown); |
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
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
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