Fix dialog styles, remove context menu from ConversationListItem's dialogs
- Restore dialog styles that magically disappeared
- Fix font-family on ConfirmationDialog's content
- Remove the custom context menu that was appearing on dialogs
Change-Id: If828d5f6b3bdfc2a6e31c58fe40ad5fff286df3d
diff --git a/client/src/components/ConversationListItem.tsx b/client/src/components/ConversationListItem.tsx
index f71705f..710fe0b 100644
--- a/client/src/components/ConversationListItem.tsx
+++ b/client/src/components/ConversationListItem.tsx
@@ -80,7 +80,7 @@
);
return (
- <Box onContextMenu={contextMenuHandler.handleAnchorPosition}>
+ <Box>
<ConversationMenu
conversationId={conversationId}
conversationName={conversationName}
@@ -88,7 +88,13 @@
isSelected={isSelected}
contextMenuProps={contextMenuHandler.props}
/>
- <ListItem button alignItems="flex-start" selected={isSelected} onClick={onClick}>
+ <ListItem
+ button
+ alignItems="flex-start"
+ selected={isSelected}
+ onClick={onClick}
+ onContextMenu={contextMenuHandler.handleAnchorPosition}
+ >
<ListItemAvatar>
<ConversationAvatar displayName={conversationName} />
</ListItemAvatar>
diff --git a/client/src/components/Dialog.tsx b/client/src/components/Dialog.tsx
index 9a6790d..aa9f01c 100644
--- a/client/src/components/Dialog.tsx
+++ b/client/src/components/Dialog.tsx
@@ -100,6 +100,7 @@
interface ConfirmationDialogProps extends Omit<BaseDialogProps, 'actions'> {
onConfirm: () => void;
confirmButtonText: string;
+ content: string;
}
export const ConfirmationDialog = ({ onConfirm, confirmButtonText, ...props }: ConfirmationDialogProps) => {
@@ -109,6 +110,7 @@
return (
<BaseDialog
{...props}
+ content={<Typography variant="body1">{props.content}</Typography>}
actions={
<>
<Button onClick={onConfirm}>{confirmButtonText}</Button>