🔄 refactor(keypairListComponent): replace Textarea component with Input component for key and value inputs

This commit is contained in:
Cristhian Zanforlin Lousa 2023-09-26 21:01:25 -03:00
commit ea2b0dcc38

View file

@ -4,7 +4,7 @@ import { KeyPairListComponentType } from "../../types/components";
import _ from "lodash"; import _ from "lodash";
import { classNames } from "../../utils/utils"; import { classNames } from "../../utils/utils";
import IconComponent from "../genericIconComponent"; import IconComponent from "../genericIconComponent";
import { Textarea } from "../ui/textarea"; import { Input } from "../ui/input";
export default function KeypairListComponent({ export default function KeypairListComponent({
value, value,
@ -49,8 +49,8 @@ export default function KeypairListComponent({
return Object.keys(obj).map((key, idx) => { return Object.keys(obj).map((key, idx) => {
return ( return (
<div key={idx} className="flex w-full gap-3"> <div key={idx} className="flex w-full gap-3">
<Textarea <Input
rows={1} type="text"
value={key.trim()} value={key.trim()}
className={classNames( className={classNames(
editNode ? "input-edit-node" : "", editNode ? "input-edit-node" : "",
@ -66,8 +66,8 @@ export default function KeypairListComponent({
}} }}
/> />
<Textarea <Input
rows={1} type="text"
value={obj[key]} value={obj[key]}
className={editNode ? "input-edit-node" : ""} className={editNode ? "input-edit-node" : ""}
placeholder="Type a value..." placeholder="Type a value..."