Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,17 @@ export function CodeEditor({
linter(jsonParseLinter(), { delay: 300 }),
lintGutter(),
// Listener для onChange
EditorView.updateListener.of(update => {
EditorView.updateListener.of((update) => {
if (update.docChanged && onChange) {
onChange(update.view.state.doc.toString());
}
})
]
}),
],
}),
});

return () => view.destroy();
}, []);
}, [defaultValue, onChange]);

return <div className="h-full w-full" ref={editorRef} />;
}
2 changes: 1 addition & 1 deletion packages/react-components/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@
@theme inline {
--font-family-sans: "Inter", system-ui, sans-serif;
--font-family-mono: "JetBrains Mono", monospace;
}
}
2 changes: 1 addition & 1 deletion packages/react-components/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Shadcn Components

export * from "./components/code-editor";
export * from "./components/copy-icon";
export * from "./components/request-line-editor";
export * from "./components/code-editor";
export * from "./shadcn/components/ui/accordion";
export * from "./shadcn/components/ui/alert";
export * from "./shadcn/components/ui/alert-dialog";
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/src/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ body {
font-weight: var(--font-weight-semibold);
line-height: var(--font-leading-none);
letter-spacing: var(--font-tracking-tight);
}
}