From 77f63b66ccd929e85397eb25ac5e6bb998156488 Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Sat, 14 Sep 2024 12:46:22 +0300 Subject: [PATCH] styling fixes --- .../Editor/components/TextEditor.tsx | 5 ++- src/containers/Landing/SeePremium.tsx | 1 - src/containers/Modals/ImportModal/index.tsx | 3 +- src/containers/Modals/JPathModal/index.tsx | 4 +- src/containers/Modals/JQModal/index.tsx | 5 +-- src/containers/Modals/JWTModal/index.tsx | 9 +++-- src/containers/Modals/SchemaModal/index.tsx | 38 ++++++++++--------- src/containers/Modals/UpgradeModal/index.tsx | 5 ++- 8 files changed, 36 insertions(+), 34 deletions(-) diff --git a/src/containers/Editor/components/TextEditor.tsx b/src/containers/Editor/components/TextEditor.tsx index d4cc32b..a816719 100644 --- a/src/containers/Editor/components/TextEditor.tsx +++ b/src/containers/Editor/components/TextEditor.tsx @@ -1,7 +1,7 @@ import React from "react"; import { LoadingOverlay } from "@mantine/core"; import styled from "styled-components"; -import Editor, { loader, useMonaco } from "@monaco-editor/react"; +import Editor, { type EditorProps, loader, useMonaco } from "@monaco-editor/react"; import useConfig from "src/store/useConfig"; import useFile from "src/store/useFile"; @@ -11,12 +11,13 @@ loader.config({ }, }); -const editorOptions = { +const editorOptions: EditorProps["options"] = { formatOnPaste: true, formatOnType: true, minimap: { enabled: false, }, + scrollBeyondLastLine: false, }; const TextEditor = () => { diff --git a/src/containers/Landing/SeePremium.tsx b/src/containers/Landing/SeePremium.tsx index edb3c73..a0aef8f 100644 --- a/src/containers/Landing/SeePremium.tsx +++ b/src/containers/Landing/SeePremium.tsx @@ -64,7 +64,6 @@ export const SeePremium = () => { mt="xl" rightSection={} radius="xl" - fz="md" > See more diff --git a/src/containers/Modals/ImportModal/index.tsx b/src/containers/Modals/ImportModal/index.tsx index 8855f28..f0c311d 100644 --- a/src/containers/Modals/ImportModal/index.tsx +++ b/src/containers/Modals/ImportModal/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import type { ModalProps } from "@mantine/core"; -import { Modal, Group, Button, TextInput, Stack, Divider, Paper, Text } from "@mantine/core"; +import { Modal, Group, Button, TextInput, Stack, Paper, Text } from "@mantine/core"; import { Dropzone } from "@mantine/dropzone"; import { event as gaEvent } from "nextjs-google-analytics"; import toast from "react-hot-toast"; @@ -93,7 +93,6 @@ export const ImportModal = ({ opened, onClose }: ModalProps) => { - diff --git a/src/containers/Modals/JQModal/index.tsx b/src/containers/Modals/JQModal/index.tsx index a0b8ed4..cff0bbe 100644 --- a/src/containers/Modals/JQModal/index.tsx +++ b/src/containers/Modals/JQModal/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import type { ModalProps } from "@mantine/core"; -import { Stack, Modal, Button, Text, Anchor, Group, TextInput, Divider } from "@mantine/core"; +import { Stack, Modal, Button, Text, Anchor, Group, TextInput } from "@mantine/core"; import { VscLinkExternal } from "react-icons/vsc"; import useJsonQuery from "src/hooks/useJsonQuery"; @@ -10,7 +10,7 @@ export const JQModal = ({ opened, onClose }: ModalProps) => { return ( - + jq is a lightweight and flexible command-line JSON processor. JSON Crack uses simplified version of jq, not all features are supported. @@ -30,7 +30,6 @@ export const JQModal = ({ opened, onClose }: ModalProps) => { value={query} onChange={e => setQuery(e.currentTarget.value)} /> - diff --git a/src/containers/Modals/JWTModal/index.tsx b/src/containers/Modals/JWTModal/index.tsx index 711a726..4e8c742 100644 --- a/src/containers/Modals/JWTModal/index.tsx +++ b/src/containers/Modals/JWTModal/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import type { ModalProps } from "@mantine/core"; -import { Modal, Button, Textarea, Divider, Group } from "@mantine/core"; +import { Modal, Button, Textarea, Group } from "@mantine/core"; import { decode } from "jsonwebtoken"; import { event as gaEvent } from "nextjs-google-analytics"; import useFile from "src/store/useFile"; @@ -29,9 +29,10 @@ export const JWTModal = ({ opened, onClose }: ModalProps) => { minRows={5} data-autofocus /> - - - + + ); diff --git a/src/containers/Modals/SchemaModal/index.tsx b/src/containers/Modals/SchemaModal/index.tsx index cbeee53..71e58c2 100644 --- a/src/containers/Modals/SchemaModal/index.tsx +++ b/src/containers/Modals/SchemaModal/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import type { ModalProps } from "@mantine/core"; -import { Stack, Modal, Button, Text, Anchor, Divider, Menu, Group } from "@mantine/core"; +import { Stack, Modal, Button, Text, Anchor, Menu, Group, Paper } from "@mantine/core"; import Editor from "@monaco-editor/react"; import { event as gaEvent } from "nextjs-google-analytics"; import { toast } from "react-hot-toast"; @@ -70,7 +70,7 @@ export const SchemaModal = ({ opened, onClose }: ModalProps) => { return ( - + Any validation failures are shown at the bottom toolbar of pane. { > View Examples - setSchema(e!)} - height={300} - language="json" - options={{ - formatOnPaste: true, - formatOnType: true, - minimap: { - enabled: false, - }, - }} - /> - + + setSchema(e!)} + height={300} + language="json" + options={{ + formatOnPaste: true, + formatOnType: true, + scrollBeyondLastLine: false, + minimap: { + enabled: false, + }, + }} + /> + - diff --git a/src/containers/Modals/UpgradeModal/index.tsx b/src/containers/Modals/UpgradeModal/index.tsx index 8bdfb2a..d0670c7 100644 --- a/src/containers/Modals/UpgradeModal/index.tsx +++ b/src/containers/Modals/UpgradeModal/index.tsx @@ -20,7 +20,7 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => { centered > - }> + }> Larger data support up to 4 MB Edit data directly on visualizations Compare data differences on graphs @@ -34,7 +34,8 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => { color="green" fullWidth mt="md" - size="lg" + size="md" + fw={500} radius="md" rightSection={} >