fix: remove search and adjust color and height of json viewer (#7140)

* Updated color of header

* Removed filter and made json full height
This commit is contained in:
Lucas Oliveira 2025-03-19 21:34:17 -03:00 • committed by GitHub
commit 1a786ab40d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 9 deletions

View file

@ -1,6 +1,4 @@
import { jsonquery } from "@jsonquerylang/jsonquery";
import { edit } from "ace-builds";
import { Check } from "lucide-react";
import { KeyboardEvent, useEffect, useRef, useState } from "react";
import {
Content,
@ -9,8 +7,6 @@ import {
} from "vanilla-jsoneditor";
import useAlertStore from "../../../stores/alertStore";
import { cn } from "../../../utils/utils";
import { Button } from "../../ui/button";
import { Input } from "../../ui/input";
interface JsonEditorProps {
data?: Content;
@ -371,7 +367,7 @@ const JsonEditor = ({
return (
<div className="flex min-h-0 flex-1 flex-col">
{allowFilter && (
{/* {allowFilter && (
<div className="mb-2 flex shrink-0 gap-2">
<Input
placeholder="Enter path (e.g. users[0].name) or JSONQuery (e.g. .users | filter(.age > 25))"
@ -406,9 +402,9 @@ const JsonEditor = ({
Clear
</Button>
</div>
)}
<div className="relative min-h-0 flex-1">
<div ref={containerRef} className={cn("absolute inset-0", className)} />
)} */}
<div className="relative h-full min-h-0 flex-1">
<div ref={containerRef} className={cn("!h-full w-full", className)} />
</div>
</div>
);

View file

@ -44,7 +44,7 @@
--tooltip: 0 0% 0%; /* hsl(0, 0%, 0%) */
--tooltip-foreground: 0 0% 100%; /* hsl(0, 0%, 100%) */
--jse-theme-color: hsl(0, 0%, 100%);
--jse-theme-color: hsl(240, 5%, 96%);
--jse-theme-color-highlight: hsl(240, 6%, 90%);
--jse-menu-color: hsl(0, 0%, 0%);
--jse-main-border: hsl(240, 6%, 90%);