Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3300674
D10279.id37142.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10279.id37142.diff
View Options
diff --git a/web/modals/threads/confirm-leave-thread-modal.css b/web/modals/threads/confirm-leave-thread-modal.css
--- a/web/modals/threads/confirm-leave-thread-modal.css
+++ b/web/modals/threads/confirm-leave-thread-modal.css
@@ -1,17 +1,5 @@
div.container {
- padding: 0 40px 32px;
- border-radius: 8px;
- background: var(--modal-bg);
color: var(--modal-fg);
- min-width: 635px;
box-sizing: border-box;
-}
-div.container > p {
font-size: var(--xl-font-20);
- padding-bottom: 32px;
-}
-div.buttonContainer {
- display: flex;
- justify-content: flex-end;
- gap: 24px;
}
diff --git a/web/modals/threads/confirm-leave-thread-modal.react.js b/web/modals/threads/confirm-leave-thread-modal.react.js
--- a/web/modals/threads/confirm-leave-thread-modal.react.js
+++ b/web/modals/threads/confirm-leave-thread-modal.react.js
@@ -18,6 +18,29 @@
const { threadInfo, onClose, onConfirm } = props;
const { uiName } = useResolvedThreadInfo(threadInfo);
+ const primaryButton = React.useMemo(
+ () => (
+ <Button
+ onClick={onConfirm}
+ type="submit"
+ variant="filled"
+ buttonColor={buttonThemes.danger}
+ >
+ Yes, leave chat
+ </Button>
+ ),
+ [onConfirm],
+ );
+
+ const secondaryButton = React.useMemo(
+ () => (
+ <Button variant="outline" onClick={onClose}>
+ Cancel
+ </Button>
+ ),
+ [onClose],
+ );
+
return (
<Modal
size="fit-content"
@@ -25,26 +48,11 @@
icon="warning-circle"
withCloseButton={false}
onClose={onClose}
+ primaryButton={primaryButton}
+ secondaryButton={secondaryButton}
>
<div className={css.container}>
- <p>
- {'Are you sure you want to leave "'}
- <span className={css['thread-name']}>{uiName}</span>
- {'"?'}
- </p>
- <div className={css.buttonContainer}>
- <Button variant="outline" onClick={onClose}>
- Cancel
- </Button>
- <Button
- variant="filled"
- buttonColor={buttonThemes.danger}
- onClick={onConfirm}
- type="submit"
- >
- Yes, leave chat
- </Button>
- </div>
+ Are you sure you want to leave “{uiName}”?
</div>
</Modal>
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 8:41 PM (20 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2507099
Default Alt Text
D10279.id37142.diff (2 KB)
Attached To
Mode
D10279: [web] cleanup confirm leave thread modal
Attached
Detach File
Event Timeline
Log In to Comment