mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-18 23:16:45 +00:00
feat(playground): add submit button to the editor interface with icon
This commit is contained in:
parent
44ef62c03a
commit
c30398a453
@ -1,6 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { Send } from "lucide-react";
|
||||||
import * as monaco from "monaco-editor";
|
import * as monaco from "monaco-editor";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { Editor, loader } from "@monaco-editor/react";
|
import { Editor, loader } from "@monaco-editor/react";
|
||||||
import { MonacoLanguageClient } from "monaco-languageclient";
|
import { MonacoLanguageClient } from "monaco-languageclient";
|
||||||
@ -98,6 +100,7 @@ export default function PlaygroundPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-full flex flex-col">
|
<div className="h-full flex flex-col">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
<Tabs defaultValue={language as string}>
|
<Tabs defaultValue={language as string}>
|
||||||
<ScrollArea>
|
<ScrollArea>
|
||||||
<TabsList className="m-3">
|
<TabsList className="m-3">
|
||||||
@ -146,6 +149,18 @@ export default function PlaygroundPage() {
|
|||||||
<ScrollBar orientation="horizontal" />
|
<ScrollBar orientation="horizontal" />
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
<div className="m-3">
|
||||||
|
<Button variant="outline">
|
||||||
|
Submit
|
||||||
|
<Send
|
||||||
|
className="-me-1 ms-2 opacity-60"
|
||||||
|
size={16}
|
||||||
|
strokeWidth={2}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<Editor
|
<Editor
|
||||||
theme="vs-dark"
|
theme="vs-dark"
|
||||||
path={file.name}
|
path={file.name}
|
||||||
|
Loading…
Reference in New Issue
Block a user