diff --git a/web/modals/threads/confirm-leave-thread-modal.css b/web/modals/threads/confirm-leave-thread-modal.css index d0376b08d..f17a3dd00 100644 --- 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 index 7a20d105e..75a131544 100644 --- a/web/modals/threads/confirm-leave-thread-modal.react.js +++ b/web/modals/threads/confirm-leave-thread-modal.react.js @@ -1,53 +1,61 @@ // @flow import * as React from 'react'; import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js'; import css from './confirm-leave-thread-modal.css'; import Button, { buttonThemes } from '../../components/button.react.js'; import Modal from '../modal.react.js'; type Props = { +threadInfo: ThreadInfo, +onClose: () => void, +onConfirm: () => void, }; function ConfirmLeaveThreadModal(props: Props): React.Node { const { threadInfo, onClose, onConfirm } = props; const { uiName } = useResolvedThreadInfo(threadInfo); + const primaryButton = React.useMemo( + () => ( + + ), + [onConfirm], + ); + + const secondaryButton = React.useMemo( + () => ( + + ), + [onClose], + ); + return (
-

- {'Are you sure you want to leave "'} - {uiName} - {'"?'} -

-
- - -
+ Are you sure you want to leave “{uiName}”?
); } export default ConfirmLeaveThreadModal;