Skip to content

Commit

Permalink
adding dependency for editor
Browse files Browse the repository at this point in the history
Signed-off-by: veds-g <[email protected]>
  • Loading branch information
veds-g committed Apr 3, 2024
1 parent 8ce6645 commit 3adee1e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"d3-selection": "^3.0.0",
"dagre": "^0.8.5",
"moment": "^2.29.4",
"monaco-editor": "^0.47.0",
"msw": "^0.47.4",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Expand Down
7 changes: 5 additions & 2 deletions ui/src/components/common/SpecEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import React, { useMemo, useState, useEffect, useCallback } from "react";
import Box from "@mui/material/Box";
import Paper from "@mui/material/Paper";
import YAML from "yaml";
import Editor from "@monaco-editor/react";
import * as monaco from "monaco-editor";
import Editor, { loader } from "@monaco-editor/react";
import CircularProgress from "@mui/material/CircularProgress";
import Button from "@mui/material/Button";
import SuccessIcon from "@mui/icons-material/CheckCircle";
import ErrorIcon from "../../../images/warning-triangle.png";

import "./style.css";

loader.config({ monaco });

export enum ViewType {
READ_ONLY,
TOGGLE_EDIT,
Expand Down Expand Up @@ -259,7 +262,7 @@ export function SpecEditor({
textOverflow: "ellipsis",
whiteSpace: "nowrap",
}}
>
>
{validationMessage.message}
</span>
</Box>
Expand Down
5 changes: 5 additions & 0 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8063,6 +8063,11 @@ moment@^2.29.4:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==

monaco-editor@^0.47.0:
version "0.47.0"
resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.47.0.tgz#39865d67e0c9fb8c6b49e760bf9caf6a6650d28e"
integrity sha512-VabVvHvQ9QmMwXu4du008ZDuyLnHs9j7ThVFsiJoXSOQk18+LF89N4ADzPbFenm0W4V2bGHnFBztIRQTgBfxzw==

[email protected]:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
Expand Down

0 comments on commit 3adee1e

Please sign in to comment.