Skip to content

Commit e41c3d3

Browse files
committed
Fix Dialog styles
1 parent 9da9289 commit e41c3d3

File tree

6 files changed

+20
-7
lines changed

6 files changed

+20
-7
lines changed

src/components/Agentic/IncidentTemplate/MCPServerDialog/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ export const MCPServerDialog = ({
154154
onClose();
155155
};
156156

157+
const title = serverData?.uid ? "Set MCP Server" : "Add MCP Server";
158+
157159
return (
158-
<Dialog title={"Add MCP Server"} onClose={handleDialogClose}>
160+
<Dialog title={title} onClose={handleDialogClose}>
159161
{steps[currentStep]}
160162
</Dialog>
161163
);

src/components/Agentic/IncidentsContainer/CreateIncidentChatOverlay/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { setIsCreateIncidentChatOpen } from "../../../../redux/slices/incidentsS
1414
import { isString } from "../../../../typeGuards/isString";
1515
import { sendUserActionTrackingEvent } from "../../../../utils/actions/sendUserActionTrackingEvent";
1616
import { CancelConfirmation } from "../../../common/CancelConfirmation";
17-
import { Dialog } from "../../common/Dialog";
1817
import { trackingEvents } from "../../tracking";
1918
import * as s from "./styles";
2019

@@ -197,7 +196,7 @@ export const CreateIncidentChatOverlay = () => {
197196
return (
198197
<>
199198
<s.StyledOverlay>
200-
<Dialog
199+
<s.StyledDialog
201200
onClose={handleCreateIncidentChatDialogClose}
202201
title={"Add new incident"}
203202
>
@@ -211,7 +210,7 @@ export const CreateIncidentChatOverlay = () => {
211210
onNavigateToIncident={handleIncidentNavigate}
212211
typeInitialMessages={true}
213212
/>
214-
</Dialog>
213+
</s.StyledDialog>
215214
</s.StyledOverlay>
216215
{isCloseConfirmationDialogVisible && (
217216
<s.StyledOverlay>

src/components/Agentic/IncidentsContainer/CreateIncidentChatOverlay/styles.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import styled from "styled-components";
22
import { Overlay } from "../../../common/Overlay";
33
import { AgentChat } from "../../common/AgentChat";
4+
import { Dialog } from "../../common/Dialog";
45

56
export const StyledOverlay = styled(Overlay)`
67
align-items: center;
78
`;
89

10+
export const StyledDialog = styled(Dialog)`
11+
height: 437px;
12+
`;
13+
914
export const StyledAgentChat = styled(AgentChat)`
1015
${/* TODO: change to color from the theme */ ""}
1116
background: #000;

src/components/Agentic/common/Dialog/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import { CrossIcon } from "../../../common/icons/12px/CrossIcon";
33
import * as s from "./styles";
44
import type { DialogProps } from "./types";
55

6-
export const Dialog = ({ title, onClose, children }: DialogProps) => (
7-
<s.Container>
6+
export const Dialog = ({
7+
title,
8+
onClose,
9+
children,
10+
className
11+
}: DialogProps) => (
12+
<s.Container className={className}>
813
<s.Header>
914
<s.Header>
1015
{isString(title) ? title : null}

src/components/Agentic/common/Dialog/styles.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ export const Container = styled.div`
44
display: flex;
55
flex-direction: column;
66
width: 635px;
7-
min-height: 420px;
7+
min-height: 437px;
8+
box-sizing: border-box;
89
max-height: fit-content;
910
padding: 12px;
1011
gap: 16px;

src/components/Agentic/common/Dialog/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ export interface DialogProps {
44
title?: string;
55
onClose: () => void;
66
children: ReactNode;
7+
className?: string;
78
}

0 commit comments

Comments
 (0)