formatting
This commit is contained in:
parent
25235a0d11
commit
207ed3b0f0
8 changed files with 40 additions and 62 deletions
|
|
@ -36,9 +36,7 @@ export default function FloatComponent({
|
||||||
max={max}
|
max={max}
|
||||||
value={value ?? ""}
|
value={value ?? ""}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={
|
className={editNode ? "input-edit-node" : ""}
|
||||||
(editNode ? "input-edit-node" : "")
|
|
||||||
}
|
|
||||||
placeholder={
|
placeholder={
|
||||||
editNode ? "Number 0 to 1" : "Type a number from zero to one"
|
editNode ? "Number 0 to 1" : "Type a number from zero to one"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,20 +28,15 @@ export default function InputListComponent({
|
||||||
}, [disabled, onChange]);
|
}, [disabled, onChange]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-3"
|
<div className="flex flex-col gap-3">
|
||||||
>
|
|
||||||
{inputList.map((i, idx) => {
|
{inputList.map((i, idx) => {
|
||||||
return (
|
return (
|
||||||
<div key={idx} className="flex w-full gap-3">
|
<div key={idx} className="flex w-full gap-3">
|
||||||
<Input
|
<Input
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
type="text"
|
type="text"
|
||||||
value={i}
|
value={i}
|
||||||
className={
|
className={editNode ? "input-edit-node" : ""}
|
||||||
editNode
|
|
||||||
? "input-edit-node"
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
placeholder="Type something..."
|
placeholder="Type something..."
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setInputList((old) => {
|
setInputList((old) => {
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ export default function IntComponent({
|
||||||
}, [disabled, onChange]);
|
}, [disabled, onChange]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full"
|
<div className="w-full">
|
||||||
>
|
|
||||||
<Input
|
<Input
|
||||||
onKeyDown={(event) => {
|
onKeyDown={(event) => {
|
||||||
if (
|
if (
|
||||||
|
|
@ -48,11 +47,7 @@ export default function IntComponent({
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
value={value ?? ""}
|
value={value ?? ""}
|
||||||
className={
|
className={editNode ? "input-edit-node" : ""}
|
||||||
editNode
|
|
||||||
? "input-edit-node"
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
placeholder={editNode ? "Integer number" : "Type an integer number"}
|
placeholder={editNode ? "Integer number" : "Type an integer number"}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|
|
||||||
|
|
@ -19,41 +19,37 @@ export default function TextAreaComponent({
|
||||||
}, [disabled]);
|
}, [disabled]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full items-center">
|
<div className="flex w-full items-center">
|
||||||
<Input
|
<Input
|
||||||
|
value={value}
|
||||||
|
disabled={disabled}
|
||||||
|
className={editNode ? "input-edit-node" : ""}
|
||||||
|
placeholder={"Type something..."}
|
||||||
|
onChange={(e) => {
|
||||||
|
onChange(e.target.value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<GenericModal
|
||||||
|
type={TypeModal.TEXT}
|
||||||
|
buttonText="Finishing Editing"
|
||||||
|
modalTitle="Edit Text"
|
||||||
value={value}
|
value={value}
|
||||||
disabled={disabled}
|
setValue={(t: string) => {
|
||||||
className={
|
onChange(t);
|
||||||
(editNode
|
|
||||||
? "input-edit-node"
|
|
||||||
: "")
|
|
||||||
}
|
|
||||||
placeholder={"Type something..."}
|
|
||||||
onChange={(e) => {
|
|
||||||
onChange(e.target.value);
|
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
<div>
|
{!editNode && (
|
||||||
<GenericModal
|
<IconComponent
|
||||||
type={TypeModal.TEXT}
|
name="ExternalLink"
|
||||||
buttonText="Finishing Editing"
|
className={
|
||||||
modalTitle="Edit Text"
|
"icons-parameters-comp" +
|
||||||
value={value}
|
(disabled ? " text-ring" : " hover:text-accent-foreground")
|
||||||
setValue={(t: string) => {
|
}
|
||||||
onChange(t);
|
/>
|
||||||
}}
|
)}
|
||||||
>
|
</GenericModal>
|
||||||
{!editNode && (
|
|
||||||
<IconComponent
|
|
||||||
name="ExternalLink"
|
|
||||||
className={
|
|
||||||
"icons-parameters-comp" +
|
|
||||||
(disabled ? " text-ring" : " hover:text-accent-foreground")
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</GenericModal>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
type={type}
|
type={type}
|
||||||
className={cn(
|
className={cn("nopan nodrag noundo nocopy input-primary", className)}
|
||||||
"input-primary nopan nodrag noundo nocopy",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
||||||
({ className, ...props }, ref) => {
|
({ className, ...props }, ref) => {
|
||||||
return (
|
return (
|
||||||
<textarea
|
<textarea
|
||||||
className={cn(
|
className={cn("nopan nodrag noundo nocopy textarea-primary", className)}
|
||||||
"textarea-primary nopan nodrag noundo nocopy",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import IconComponent from "../../../components/genericIconComponent";
|
import IconComponent from "../../../components/genericIconComponent";
|
||||||
import { classNames } from "../../../utils/utils";
|
|
||||||
import { Textarea } from "../../../components/ui/textarea";
|
import { Textarea } from "../../../components/ui/textarea";
|
||||||
|
import { classNames } from "../../../utils/utils";
|
||||||
|
|
||||||
export default function ChatInput({
|
export default function ChatInput({
|
||||||
lockChat,
|
lockChat,
|
||||||
|
|
@ -26,7 +26,7 @@ export default function ChatInput({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<Textarea
|
<Textarea
|
||||||
onKeyDown={(event) => {
|
onKeyDown={(event) => {
|
||||||
if (event.key === "Enter" && !lockChat && !event.shiftKey) {
|
if (event.key === "Enter" && !lockChat && !event.shiftKey) {
|
||||||
sendMessage();
|
sendMessage();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { useContext, useState } from "react";
|
import { useContext, useState } from "react";
|
||||||
import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
||||||
import IconComponent from "../../../../components/genericIconComponent";
|
import IconComponent from "../../../../components/genericIconComponent";
|
||||||
|
import { Input } from "../../../../components/ui/input";
|
||||||
import { Separator } from "../../../../components/ui/separator";
|
import { Separator } from "../../../../components/ui/separator";
|
||||||
import { alertContext } from "../../../../contexts/alertContext";
|
import { alertContext } from "../../../../contexts/alertContext";
|
||||||
import { TabsContext } from "../../../../contexts/tabsContext";
|
import { TabsContext } from "../../../../contexts/tabsContext";
|
||||||
|
|
@ -15,7 +16,6 @@ import {
|
||||||
} from "../../../../utils/styleUtils";
|
} from "../../../../utils/styleUtils";
|
||||||
import { classNames } from "../../../../utils/utils";
|
import { classNames } from "../../../../utils/utils";
|
||||||
import DisclosureComponent from "../DisclosureComponent";
|
import DisclosureComponent from "../DisclosureComponent";
|
||||||
import { Input } from "../../../../components/ui/input";
|
|
||||||
|
|
||||||
export default function ExtraSidebar() {
|
export default function ExtraSidebar() {
|
||||||
const { data } = useContext(typesContext);
|
const { data } = useContext(typesContext);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue