diff --git a/web/modals/threads/members/add-members-modal.react.js b/web/modals/threads/members/add-members-modal.react.js new file mode 100644 --- /dev/null +++ b/web/modals/threads/members/add-members-modal.react.js @@ -0,0 +1,95 @@ +// @flow + +import * as React from 'react'; + +import Button from '../../../components/button.react'; +import SearchModal from '../../search-modal.react'; +import AddMembersList from './add-members-list.react'; +import css from './members-modal.css'; + +type ContentProps = { + +searchText: string, + +threadID: string, + +onClose: () => void, +}; + +function AddMembersModalContent(props: ContentProps): React.Node { + const { onClose } = props; + + const [pendingUsersToAdd, setPendingUsersToAdd] = React.useState< + $ReadOnly>, + >(new Set()); + + const userSearchResults = []; + + const onSwitchUser = React.useCallback( + userID => + setPendingUsersToAdd(users => { + const newUsers = new Set(users); + if (newUsers.has(userID)) { + newUsers.delete(userID); + } else { + newUsers.add(userID); + } + return newUsers; + }), + [], + ); + + return ( +
+
+ +
+
+ + +
+
+ ); +} + +type Props = { + +threadID: string, + +onClose: () => void, +}; + +function AddMembersModal(props: Props): React.Node { + const { threadID, onClose } = props; + + const addMembersModalContent = React.useCallback( + (searchText: string) => ( + + ), + [onClose, threadID], + ); + + return ( + + {addMembersModalContent} + + ); +} + +export default AddMembersModal; diff --git a/web/modals/threads/members/members-modal.css b/web/modals/threads/members/members-modal.css --- a/web/modals/threads/members/members-modal.css +++ b/web/modals/threads/members/members-modal.css @@ -50,6 +50,27 @@ text-align: center; } +div.addMembersContent { + display: flex; + flex-direction: column; + overflow: scroll; + color: var(--fg); + row-gap: 16px; + width: 383px; + height: 617px; +} + +div.addMembersListContainer { + overflow: scroll; + flex: 1; +} + +div.addMembersFooter { + display: flex; + justify-content: end; + column-gap: 16px; +} + div.addMemberItemsGroupHeader { font-size: var(--s-font-14); color: var(--add-members-group-header-color);