Changeset View
Changeset View
Standalone View
Standalone View
web/modals/chat/sidebar-list-modal.react.js
Show All 9 Lines | |||||
import { threadSearchText } from 'lib/shared/thread-utils'; | import { threadSearchText } from 'lib/shared/thread-utils'; | ||||
import type { ThreadInfo } from 'lib/types/thread-types'; | import type { ThreadInfo } from 'lib/types/thread-types'; | ||||
import chatThreadListCSS from '../../chat/chat-thread-list.css'; | import chatThreadListCSS from '../../chat/chat-thread-list.css'; | ||||
import SidebarItem from '../../chat/sidebar-item.react'; | import SidebarItem from '../../chat/sidebar-item.react'; | ||||
import { useSelector } from '../../redux/redux-utils'; | import { useSelector } from '../../redux/redux-utils'; | ||||
import globalCSS from '../../style.css'; | import globalCSS from '../../style.css'; | ||||
import { MagnifyingGlass } from '../../vectors.react'; | import { MagnifyingGlass } from '../../vectors.react'; | ||||
import Input from '../input.react'; | |||||
import { useModalContext } from '../modal-provider.react'; | import { useModalContext } from '../modal-provider.react'; | ||||
import Modal from '../modal.react'; | import Modal from '../modal.react'; | ||||
type Props = { | type Props = { | ||||
+threadInfo: ThreadInfo, | +threadInfo: ThreadInfo, | ||||
}; | }; | ||||
function SidebarListModal(props: Props): React.Node { | function SidebarListModal(props: Props): React.Node { | ||||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | <Modal name="Sidebars" onClose={popModal}> | ||||
className={classNames( | className={classNames( | ||||
globalCSS['modal-body'], | globalCSS['modal-body'], | ||||
globalCSS['resized-modal-body'], | globalCSS['resized-modal-body'], | ||||
)} | )} | ||||
> | > | ||||
<div> | <div> | ||||
<div className={chatThreadListCSS.search}> | <div className={chatThreadListCSS.search}> | ||||
<MagnifyingGlass className={chatThreadListCSS.searchVector} /> | <MagnifyingGlass className={chatThreadListCSS.searchVector} /> | ||||
<input | <Input | ||||
type="text" | type="text" | ||||
placeholder="Search sidebars" | placeholder="Search sidebars" | ||||
value={searchState.text} | value={searchState.text} | ||||
onChange={onChangeSearchText} | onChange={onChangeSearchText} | ||||
/> | /> | ||||
{clearQueryButton} | {clearQueryButton} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<ul className={chatThreadListCSS.list}>{sidebars}</ul> | <ul className={chatThreadListCSS.list}>{sidebars}</ul> | ||||
</div> | </div> | ||||
</Modal> | </Modal> | ||||
); | ); | ||||
} | } | ||||
export default SidebarListModal; | export default SidebarListModal; |