rename HeaderButton
This commit is contained in:
parent
e78c81f7cb
commit
23b6dac06d
15 changed files with 81 additions and 66 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState } from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import { HeaderButton, StyledTooltip } from ".";
|
||||
import { type PlacesType } from "react-tooltip";
|
||||
import { HeaderButton, StyledTooltip } from ".";
|
||||
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ interface HeaderButtonWithTextProps {
|
|||
tooltipPlacement?: PlacesType;
|
||||
}
|
||||
|
||||
const HeaderButtonWithText = React.forwardRef<
|
||||
const ButtonWithTooltip = React.forwardRef<
|
||||
HTMLButtonElement,
|
||||
HeaderButtonWithTextProps
|
||||
>((props: HeaderButtonWithTextProps, ref) => {
|
||||
|
|
@ -71,4 +71,4 @@ const HeaderButtonWithText = React.forwardRef<
|
|||
);
|
||||
});
|
||||
|
||||
export default HeaderButtonWithText;
|
||||
export default ButtonWithTooltip;
|
||||
|
|
@ -22,8 +22,8 @@ import { RootState } from "../redux/store";
|
|||
import { getFontSize, isMetaEquivalentKeyPressed } from "../util";
|
||||
import { FREE_TRIAL_LIMIT_REQUESTS } from "../util/freeTrial";
|
||||
import { getLocalStorage, setLocalStorage } from "../util/localStorage";
|
||||
import ButtonWithTooltip from "./ButtonWithTooltip";
|
||||
import TextDialog from "./dialogs";
|
||||
import HeaderButtonWithText from "./HeaderButtonWithText";
|
||||
import ProgressBar from "./loaders/ProgressBar";
|
||||
import PostHogPageView from "./PosthogPageView";
|
||||
import ProfileSwitcher from "./ProfileSwitcher";
|
||||
|
|
@ -264,7 +264,7 @@ const Layout = () => {
|
|||
</div>
|
||||
|
||||
<ProfileSwitcher />
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
tooltipPlacement="top-end"
|
||||
text="More"
|
||||
onClick={() => {
|
||||
|
|
@ -276,7 +276,7 @@ const Layout = () => {
|
|||
}}
|
||||
>
|
||||
<EllipsisHorizontalCircleIcon width="1.4em" height="1.4em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
</Footer>
|
||||
)}
|
||||
</GridDiv>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import { useWebviewListener } from "../hooks/useWebviewListener";
|
|||
import { setLastControlServerBetaEnabledStatus } from "../redux/slices/miscSlice";
|
||||
import { RootState } from "../redux/store";
|
||||
import { getFontSize } from "../util";
|
||||
import HeaderButtonWithText from "./HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "./ButtonWithTooltip";
|
||||
|
||||
const StyledListbox = styled(Listbox)`
|
||||
background-color: ${vscBackground};
|
||||
|
|
@ -235,7 +235,7 @@ function ProfileSwitcher(props: {}) {
|
|||
)}
|
||||
|
||||
{/* Settings button (either opens config.json or /settings page in control plane) */}
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
tooltipPlacement="top-end"
|
||||
onClick={() => {
|
||||
if (selectedProfileId === "local") {
|
||||
|
|
@ -250,11 +250,11 @@ function ProfileSwitcher(props: {}) {
|
|||
text="Configure Continue"
|
||||
>
|
||||
<Cog6ToothIcon width="1.4em" height="1.4em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
|
||||
{/* Only show login if beta explicitly enabled */}
|
||||
{controlServerBetaEnabled && (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
tooltipPlacement="top-end"
|
||||
text={
|
||||
session?.account
|
||||
|
|
@ -270,7 +270,7 @@ function ProfileSwitcher(props: {}) {
|
|||
}}
|
||||
>
|
||||
<UserCircleIcon width="1.4em" height="1.4em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { MinusCircleIcon, XMarkIcon } from "@heroicons/react/24/outline";
|
|||
import { ContinueError } from "core";
|
||||
import styled from "styled-components";
|
||||
import { defaultBorderRadius, vscBackground } from "..";
|
||||
import HeaderButtonWithText from "../HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "../ButtonWithTooltip";
|
||||
|
||||
const Div = styled.div`
|
||||
padding: 8px;
|
||||
|
|
@ -29,12 +29,12 @@ function ErrorStepContainer(props: ErrorStepContainerProps) {
|
|||
display: "flex",
|
||||
}}
|
||||
>
|
||||
<HeaderButtonWithText text="Collapse" onClick={() => props.onClose()}>
|
||||
<ButtonWithTooltip text="Collapse" onClick={() => props.onClose()}>
|
||||
<MinusCircleIcon width="1.3em" height="1.3em" />
|
||||
</HeaderButtonWithText>
|
||||
<HeaderButtonWithText text="Delete" onClick={() => props.onDelete()}>
|
||||
</ButtonWithTooltip>
|
||||
<ButtonWithTooltip text="Delete" onClick={() => props.onDelete()}>
|
||||
<XMarkIcon width="1.3em" height="1.3em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
</div>
|
||||
<Div>
|
||||
<pre style={{ whiteSpace: "pre-wrap", wordWrap: "break-word" }}>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { IdeMessengerContext } from "../../context/IdeMessenger";
|
|||
import useUIConfig from "../../hooks/useUIConfig";
|
||||
import { RootState } from "../../redux/store";
|
||||
import { getFontSize } from "../../util";
|
||||
import HeaderButtonWithText from "../HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "../ButtonWithTooltip";
|
||||
import { CopyButton } from "../markdown/CopyButton";
|
||||
import StyledMarkdownPreview from "../markdown/StyledMarkdownPreview";
|
||||
|
||||
|
|
@ -145,7 +145,8 @@ function StepContainer(props: StepContainerProps) {
|
|||
)}
|
||||
|
||||
{truncatedEarly && (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
tabIndex={-1}
|
||||
text="Continue generation"
|
||||
onClick={(e) => {
|
||||
props.onContinueGeneration();
|
||||
|
|
@ -156,23 +157,25 @@ function StepContainer(props: StepContainerProps) {
|
|||
width="1.2em"
|
||||
height="1.2em"
|
||||
/>
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
|
||||
<CopyButton
|
||||
tabIndex={-1}
|
||||
text={stripImages(props.item.message.content)}
|
||||
color={lightGray}
|
||||
/>
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
tabIndex={-1}
|
||||
text="Regenerate"
|
||||
onClick={(e) => {
|
||||
props.onRetry();
|
||||
}}
|
||||
>
|
||||
<ArrowPathIcon color={lightGray} width="1.2em" height="1.2em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
{feedback === false || (
|
||||
<HeaderButtonWithText text="Helpful">
|
||||
<ButtonWithTooltip text="Helpful" tabIndex={-1}>
|
||||
<HandThumbUpIcon
|
||||
className={
|
||||
"cursor-pointer hover:text-green-500" +
|
||||
|
|
@ -185,10 +188,10 @@ function StepContainer(props: StepContainerProps) {
|
|||
sendFeedback(true);
|
||||
}}
|
||||
/>
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
{feedback === true || (
|
||||
<HeaderButtonWithText text="Unhelpful">
|
||||
<ButtonWithTooltip text="Unhelpful" tabIndex={-1}>
|
||||
<HandThumbDownIcon
|
||||
className={
|
||||
"cursor-pointer hover:text-red-500" +
|
||||
|
|
@ -201,9 +204,9 @@ function StepContainer(props: StepContainerProps) {
|
|||
sendFeedback(false);
|
||||
}}
|
||||
/>
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
<HeaderButtonWithText text="Delete Message">
|
||||
<ButtonWithTooltip text="Delete Message" tabIndex={-1}>
|
||||
<TrashIcon
|
||||
color={lightGray}
|
||||
width="1.2em"
|
||||
|
|
@ -212,7 +215,7 @@ function StepContainer(props: StepContainerProps) {
|
|||
props.onDelete();
|
||||
}}
|
||||
/>
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import {
|
|||
ArrowRightIcon,
|
||||
ArrowUpOnSquareIcon,
|
||||
AtSymbolIcon,
|
||||
BoltIcon,
|
||||
BookOpenIcon,
|
||||
CodeBracketIcon,
|
||||
CommandLineIcon,
|
||||
|
|
@ -16,7 +17,6 @@ import {
|
|||
PlusIcon,
|
||||
SparklesIcon,
|
||||
TrashIcon,
|
||||
BoltIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { Editor } from "@tiptap/react";
|
||||
import {
|
||||
|
|
@ -40,8 +40,8 @@ import {
|
|||
setDialogMessage,
|
||||
setShowDialog,
|
||||
} from "../../redux/slices/uiStateSlice";
|
||||
import ButtonWithTooltip from "../ButtonWithTooltip";
|
||||
import FileIcon from "../FileIcon";
|
||||
import HeaderButtonWithText from "../HeaderButtonWithText";
|
||||
import SafeImg from "../SafeImg";
|
||||
import AddDocsDialog from "../dialogs/AddDocsDialog";
|
||||
import { ComboBoxItem } from "./types";
|
||||
|
|
@ -113,7 +113,9 @@ function DropdownIcon(props: { className?: string; item: ComboBoxItem }) {
|
|||
|
||||
const ItemsDiv = styled.div`
|
||||
border-radius: ${defaultBorderRadius};
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0px 10px 20px rgba(0, 0, 0, 0.1);
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(0, 0, 0, 0.05),
|
||||
0px 10px 20px rgba(0, 0, 0, 0.1);
|
||||
font-size: 0.9rem;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
|
@ -410,7 +412,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
|
|||
{item.subActions?.map((subAction) => {
|
||||
const Icon = ICONS_FOR_DROPDOWN[subAction.icon];
|
||||
return (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
onClick={(e) => {
|
||||
subAction.action(item);
|
||||
e.stopPropagation();
|
||||
|
|
@ -420,7 +422,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
|
|||
text={undefined}
|
||||
>
|
||||
<Icon width="1.2em" height="1.2em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
);
|
||||
})}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import styled from "styled-components";
|
|||
import { defaultBorderRadius, vscEditorBackground } from "..";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
import { isJetBrains } from "../../util";
|
||||
import HeaderButtonWithText from "../HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "../ButtonWithTooltip";
|
||||
import { CopyButton } from "./CopyButton";
|
||||
|
||||
const TopDiv = styled.div`
|
||||
|
|
@ -78,13 +78,13 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
|
|||
<TopDiv>
|
||||
<SecondDiv bottom={props.bottom || false}>
|
||||
{isJetBrains() || (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
text={
|
||||
isTerminalCodeBlock(props.language, props.text)
|
||||
? "Run in terminal"
|
||||
: applying
|
||||
? "Applying..."
|
||||
: "Apply to current file"
|
||||
? "Applying..."
|
||||
: "Apply to current file"
|
||||
}
|
||||
disabled={applying}
|
||||
style={{ backgroundColor: vscEditorBackground }}
|
||||
|
|
@ -111,9 +111,9 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
|
|||
) : (
|
||||
<PlayIcon className="w-4 h-4" />
|
||||
)}
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
text="Insert at cursor"
|
||||
style={{ backgroundColor: vscEditorBackground }}
|
||||
onClick={() => {
|
||||
|
|
@ -121,7 +121,7 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
|
|||
}}
|
||||
>
|
||||
<ArrowLeftEndOnRectangleIcon className="w-4 h-4" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
<CopyButton text={props.text} />
|
||||
</SecondDiv>
|
||||
</TopDiv>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import styled from "styled-components";
|
|||
import { defaultBorderRadius, lightGray, vscEditorBackground } from "..";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
import { getFontSize } from "../../util";
|
||||
import ButtonWithTooltip from "../ButtonWithTooltip";
|
||||
import FileIcon from "../FileIcon";
|
||||
import HeaderButtonWithText from "../HeaderButtonWithText";
|
||||
import StyledMarkdownPreview from "./StyledMarkdownPreview";
|
||||
|
||||
const PreviewMarkdownDiv = styled.div<{
|
||||
|
|
@ -49,7 +49,7 @@ interface CodeSnippetPreviewProps {
|
|||
editing?: boolean;
|
||||
}
|
||||
|
||||
const StyledHeaderButtonWithText = styled(HeaderButtonWithText)<{
|
||||
const StyledHeaderButtonWithText = styled(ButtonWithTooltip)<{
|
||||
color?: string;
|
||||
}>`
|
||||
${(props) => props.color && `background-color: ${props.color};`}
|
||||
|
|
@ -133,7 +133,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) {
|
|||
<PaintBrushIcon width="1.1em" height="1.1em" />
|
||||
</StyledHeaderButtonWithText>
|
||||
)}
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
text="Delete"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
|
|
@ -141,7 +141,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) {
|
|||
}}
|
||||
>
|
||||
<XMarkIcon width="1.1em" height="1.1em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
</div>
|
||||
</PreviewMarkdownHeader>
|
||||
<div
|
||||
|
|
@ -162,7 +162,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) {
|
|||
</div>
|
||||
|
||||
{(codeBlockRef.current?.scrollHeight ?? 0) > MAX_PREVIEW_HEIGHT && (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
className="bottom-1 right-1 absolute"
|
||||
text={collapsed ? "Expand" : "Collapse"}
|
||||
>
|
||||
|
|
@ -179,7 +179,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) {
|
|||
onClick={() => setCollapsed(true)}
|
||||
/>
|
||||
)}
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
</PreviewMarkdownDiv>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,11 +2,12 @@ import { CheckIcon, ClipboardIcon } from "@heroicons/react/24/outline";
|
|||
import { useContext, useState } from "react";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
import { isJetBrains } from "../../util";
|
||||
import HeaderButtonWithText from "../HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "../ButtonWithTooltip";
|
||||
|
||||
interface CopyButtonProps {
|
||||
text: string | (() => string);
|
||||
color?: string;
|
||||
tabIndex?: number;
|
||||
}
|
||||
|
||||
export function CopyButton(props: CopyButtonProps) {
|
||||
|
|
@ -16,7 +17,8 @@ export function CopyButton(props: CopyButtonProps) {
|
|||
|
||||
return (
|
||||
<>
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
tabIndex={props.tabIndex}
|
||||
text={copied ? "Copied!" : "Copy"}
|
||||
onClick={(e) => {
|
||||
const text =
|
||||
|
|
@ -36,7 +38,7 @@ export function CopyButton(props: CopyButtonProps) {
|
|||
) : (
|
||||
<ClipboardIcon className="w-4 h-4" color={props.color} />
|
||||
)}
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ function PreWithToolbar(props: { children: any; language: string | null }) {
|
|||
|
||||
return (
|
||||
<div
|
||||
tabIndex={-1}
|
||||
style={{ padding: "0px" }}
|
||||
className="relative"
|
||||
onMouseEnter={() => setHovering(true)}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import {
|
|||
} from "../../redux/slices/uiStateSlice";
|
||||
import { RootState } from "../../redux/store";
|
||||
import { getMetaKeyLabel, isMetaEquivalentKeyPressed } from "../../util";
|
||||
import HeaderButtonWithText from "../HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "../ButtonWithTooltip";
|
||||
import ConfirmationDialog from "../dialogs/ConfirmationDialog";
|
||||
|
||||
const GridDiv = styled.div`
|
||||
|
|
@ -149,7 +149,7 @@ function ListBoxOption({
|
|||
<div className="flex items-center justify-between gap-3 h-5 relative">
|
||||
<span>{option.title}</span>
|
||||
{hovered && showDelete && (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
text={undefined}
|
||||
onClick={(e) => {
|
||||
dispatch(setShowDialog(true));
|
||||
|
|
@ -173,7 +173,7 @@ function ListBoxOption({
|
|||
className="absolute right-0 p-1"
|
||||
>
|
||||
<TrashIcon width="1.2em" height="1.2em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
</div>
|
||||
</StyledListboxOption>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
} from "..";
|
||||
import { PackageDimension } from "../../pages/AddNewModel/configs/models";
|
||||
import { providers } from "../../pages/AddNewModel/configs/providers";
|
||||
import HeaderButtonWithText from "../HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "../ButtonWithTooltip";
|
||||
import InfoHover from "../InfoHover";
|
||||
import ModelProviderTag, { ModelProviderTags } from "./ModelProviderTag";
|
||||
|
||||
|
|
@ -161,9 +161,9 @@ function ModelCard(props: ModelCardProps) {
|
|||
href={props.refUrl}
|
||||
target="_blank"
|
||||
>
|
||||
<HeaderButtonWithText text="Read the docs">
|
||||
<ButtonWithTooltip text="Read the docs">
|
||||
<BookOpenIcon width="1.6em" height="1.6em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -216,7 +216,7 @@ function ModelCard(props: ModelCardProps) {
|
|||
return null;
|
||||
}
|
||||
return (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
text={info.title}
|
||||
className="p-2 text-center mx-1 items-center"
|
||||
style={{
|
||||
|
|
@ -237,7 +237,7 @@ function ModelCard(props: ModelCardProps) {
|
|||
height="24px"
|
||||
/>
|
||||
)}
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,13 @@ a:focus {
|
|||
outline: none;
|
||||
}
|
||||
|
||||
*:focus {
|
||||
outline: 1px solid red;
|
||||
border: 1px solid black;
|
||||
background-color: gainsboro;
|
||||
visibility: visible !important;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import {
|
|||
vscForeground,
|
||||
vscInputBackground,
|
||||
} from "../components";
|
||||
import HeaderButtonWithText from "../components/HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "../components/ButtonWithTooltip";
|
||||
import useHistory from "../hooks/useHistory";
|
||||
import { useNavigationListener } from "../hooks/useNavigationListener";
|
||||
import { getFontSize } from "../util";
|
||||
|
|
@ -175,7 +175,7 @@ function TableRow({
|
|||
</TdDiv>
|
||||
|
||||
{hovered && (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
className="mr-2"
|
||||
text="Edit"
|
||||
onClick={async () => {
|
||||
|
|
@ -183,11 +183,11 @@ function TableRow({
|
|||
}}
|
||||
>
|
||||
<PencilSquareIcon width="1.3em" height="1.3em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
|
||||
{hovered && (
|
||||
<HeaderButtonWithText
|
||||
<ButtonWithTooltip
|
||||
className="mr-2"
|
||||
text="Delete"
|
||||
onClick={async () => {
|
||||
|
|
@ -196,7 +196,7 @@ function TableRow({
|
|||
}}
|
||||
>
|
||||
<TrashIcon width="1.3em" height="1.3em" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { DiffEditor } from "@monaco-editor/react";
|
|||
import React, { useContext, useEffect } from "react";
|
||||
import { v4 } from "uuid";
|
||||
import { vscInputBackground } from "../components";
|
||||
import HeaderButtonWithText from "../components/HeaderButtonWithText";
|
||||
import ButtonWithTooltip from "../components/ButtonWithTooltip";
|
||||
import { IdeMessengerContext } from "../context/IdeMessenger";
|
||||
|
||||
interface EditorFrameProps {
|
||||
|
|
@ -53,12 +53,12 @@ function EditorFrame(props: EditorFrameProps) {
|
|||
{props.filename.split("/").pop()}
|
||||
</code>
|
||||
<div className="flex items-center">
|
||||
<HeaderButtonWithText text="Reject" onClick={() => {}}>
|
||||
<ButtonWithTooltip text="Reject" onClick={() => {}}>
|
||||
<XMarkIcon width="1.3em" height="1.3em" color="red" />
|
||||
</HeaderButtonWithText>
|
||||
<HeaderButtonWithText text="Accept" onClick={() => {}}>
|
||||
</ButtonWithTooltip>
|
||||
<ButtonWithTooltip text="Accept" onClick={() => {}}>
|
||||
<CheckIcon width="1.3em" height="1.3em" color="lightgreen" />
|
||||
</HeaderButtonWithText>
|
||||
</ButtonWithTooltip>
|
||||
</div>
|
||||
</div>
|
||||
{/* <Editor
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue