Skip to content

Commit

Permalink
feat: ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AykutSarac committed Dec 17, 2023
1 parent d4ce0b1 commit 1d59b2f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "tsc && eslint src && prettier --check src",
"lint": "tsc --project tsconfig.json && eslint src && prettier --check src",
"lint:fix": "eslint --fix src & prettier --write src",
"analyze": "ANALYZE=true npm run build"
},
Expand All @@ -20,7 +20,7 @@
"@mantine/hooks": "^6.0.17",
"@mantine/next": "^6.0.21",
"@mantine/prism": "^6.0.21",
"@monaco-editor/react": "^4.6.0",
"@monaco-editor/react": "^4.5.2",
"@sentry/nextjs": "^7.72.0",
"@supabase/auth-helpers-nextjs": "^0.8.1",
"@supabase/auth-helpers-react": "^0.4.2",
Expand Down
12 changes: 6 additions & 6 deletions src/containers/Editor/LiveEditor/Tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,12 @@ export const Tools: React.FC<{ isWidget?: boolean }> = ({ isWidget = false }) =>
>
<Text size="xs">Show Expand/Collapse</Text>
</Menu.Item>
<Menu.Item
icon={<BsCheck2 opacity={darkmodeEnabled ? 100 : 0} />}
onClick={() => toggleDarkMode(!darkmodeEnabled)}
>
<Text size="xs">Dark Mode</Text>
</Menu.Item>
</Menu.Dropdown>
</Menu>
)}
Expand Down Expand Up @@ -527,12 +533,6 @@ export const Tools: React.FC<{ isWidget?: boolean }> = ({ isWidget = false }) =>
</Text>
</Menu.Item>
)}
<Menu.Item
icon={<BsCheck2 opacity={darkmodeEnabled ? 100 : 0} />}
onClick={() => toggleDarkMode(!darkmodeEnabled)}
>
<Text size="xs">Dark Mode</Text>
</Menu.Item>
{user && (
<>
<Menu.Divider />
Expand Down
10 changes: 9 additions & 1 deletion src/containers/Modals/TypeModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import React from "react";
import { Stack, Modal, ModalProps, ScrollArea } from "@mantine/core";
import { Stack, Modal, ModalProps, ScrollArea, Select } from "@mantine/core";
import { Prism } from "@mantine/prism";
import vsDark from "prism-react-renderer/themes/vsDark";
import vsLight from "prism-react-renderer/themes/vsLight";
import useJsonQuery from "src/hooks/useJsonQuery";

const typeOptions = [
{
label: "TypeScript",
value: "typescript",
},
];

export const TypeModal: React.FC<ModalProps> = ({ opened, onClose }) => {
const { getJsonType } = useJsonQuery();
const [type, setType] = React.useState("");
Expand All @@ -18,6 +25,7 @@ export const TypeModal: React.FC<ModalProps> = ({ opened, onClose }) => {
return (
<Modal title="Generate Types" size="auto" opened={opened} onClose={onClose} centered>
<Stack py="sm">
<Select value="typescript" data={typeOptions} />
<ScrollArea>
<Prism
miw={350}
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
dependencies:
state-local "^1.0.6"

"@monaco-editor/react@^4.6.0":
"@monaco-editor/react@^4.5.2":
version "4.6.0"
resolved "https://registry.yarnpkg.com/@monaco-editor/react/-/react-4.6.0.tgz#bcc68671e358a21c3814566b865a54b191e24119"
integrity sha512-RFkU9/i7cN2bsq/iTkurMWOEErmYcY6JiQI3Jn+WeR/FGISH8JbHERjpS9oRuSOPvDMJI0Z8nJeKkbOs9sBYQw==
Expand Down

0 comments on commit 1d59b2f

Please sign in to comment.