Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3487642
D4311.id13837.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4311.id13837.diff
View Options
diff --git a/web/settings/relationship/add-users-list-modal.react.js b/web/settings/relationship/add-users-list-modal.react.js
new file mode 100644
--- /dev/null
+++ b/web/settings/relationship/add-users-list-modal.react.js
@@ -0,0 +1,65 @@
+// @flow
+
+import * as React from 'react';
+
+import type {
+ UserRelationshipStatus,
+ RelationshipAction,
+} from 'lib/types/relationship-types.js';
+
+import type { ButtonVariant } from '../../components/button.react.js';
+import SearchModal from '../../modals/search-modal.react';
+import AddUsersList from './add-users-list.react.js';
+
+type Props = {
+ +closeModal: () => void,
+ +name: string,
+ +excludedStatuses: $ReadOnlySet<UserRelationshipStatus>,
+ +confirmButtonContent: React.Node,
+ +confirmButtonVariant?: ButtonVariant,
+ +relationshipAction: RelationshipAction,
+};
+
+function AddUsersListModal(props: Props): React.Node {
+ const {
+ closeModal,
+ name,
+ excludedStatuses,
+ confirmButtonContent,
+ confirmButtonVariant = 'primary',
+ relationshipAction,
+ } = props;
+
+ const addUsersListChildGenerator = React.useCallback(
+ (searchText: string) => (
+ <AddUsersList
+ searchText={searchText}
+ excludedStatuses={excludedStatuses}
+ confirmButtonContent={confirmButtonContent}
+ confirmButtonVariant={confirmButtonVariant}
+ relationshipAction={relationshipAction}
+ closeModal={closeModal}
+ />
+ ),
+ [
+ excludedStatuses,
+ confirmButtonContent,
+ confirmButtonVariant,
+ relationshipAction,
+ closeModal,
+ ],
+ );
+
+ return (
+ <SearchModal
+ name={name}
+ onClose={closeModal}
+ size="large"
+ searchPlaceholder="Search by name"
+ >
+ {addUsersListChildGenerator}
+ </SearchModal>
+ );
+}
+
+export default AddUsersListModal;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 8:35 AM (19 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2675815
Default Alt Text
D4311.id13837.diff (1 KB)
Attached To
Mode
D4311: [web] Introduce a modal that allows adding new friends / blocking users
Attached
Detach File
Event Timeline
Log In to Comment