Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3402846
D4680.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
D4680.diff
View Options
diff --git a/web/modals/threads/settings/thread-settings-relationship-tab.css b/web/modals/threads/settings/thread-settings-relationship-tab.css
new file mode 100644
--- /dev/null
+++ b/web/modals/threads/settings/thread-settings-relationship-tab.css
@@ -0,0 +1,5 @@
+div.container {
+ display: flex;
+ flex-direction: column;
+ row-gap: 10px;
+}
diff --git a/web/modals/threads/settings/thread-settings-relationship-tab.react.js b/web/modals/threads/settings/thread-settings-relationship-tab.react.js
new file mode 100644
--- /dev/null
+++ b/web/modals/threads/settings/thread-settings-relationship-tab.react.js
@@ -0,0 +1,35 @@
+// @flow
+
+import * as React from 'react';
+
+import { type SetState } from 'lib/types/hook-types';
+import { type RelationshipButton } from 'lib/types/relationship-types';
+import type { UserInfo } from 'lib/types/user-types';
+
+import ThreadSettingsRelationshipButton from './thread-settings-relationship-button.react';
+import css from './thread-settings-relationship-tab.css';
+
+type Props = {
+ +setErrorMessage: SetState<string>,
+ +relationshipButtons: $ReadOnlyArray<RelationshipButton>,
+ +otherUserInfo: UserInfo,
+};
+
+function ThreadSettingsRelationshipTab(props: Props): React.Node {
+ const { relationshipButtons, otherUserInfo, setErrorMessage } = props;
+ const buttons = React.useMemo(
+ () =>
+ relationshipButtons.map(action => (
+ <ThreadSettingsRelationshipButton
+ key={action}
+ relationshipButton={action}
+ otherUserInfo={otherUserInfo}
+ setErrorMessage={setErrorMessage}
+ />
+ )),
+ [otherUserInfo, relationshipButtons, setErrorMessage],
+ );
+ return <div className={css.container}>{buttons}</div>;
+}
+
+export default ThreadSettingsRelationshipTab;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 9:32 PM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2612728
Default Alt Text
D4680.diff (1 KB)
Attached To
Mode
D4680: [web] Introduce `ThreadSettingsRelationshipTab` component
Attached
Detach File
Event Timeline
Log In to Comment