mirror of https://github.com/ctk-hq/ctk
feat(frontend): implemented labels form for network modal
parent
cd4ed9b98e
commit
f2be93951f
@ -1,5 +1,39 @@
|
||||
const Labels = () => {
|
||||
return <></>;
|
||||
import { styled } from "@mui/joy";
|
||||
import { FunctionComponent, ReactElement } from "react";
|
||||
import Records from "../../Records";
|
||||
|
||||
const Root = styled("div")`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
const Labels: FunctionComponent = (): ReactElement => {
|
||||
return (
|
||||
<Root>
|
||||
<Records
|
||||
name="labels"
|
||||
modal="network"
|
||||
title="Labels"
|
||||
referred="label"
|
||||
fields={(index: number) => [
|
||||
{
|
||||
name: `labels[${index}].key`,
|
||||
placeholder: "Key",
|
||||
required: true,
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
name: `labels[${index}].value`,
|
||||
placeholder: "Value",
|
||||
required: true,
|
||||
type: "text"
|
||||
}
|
||||
]}
|
||||
newValue={{ key: "", value: "" }}
|
||||
/>
|
||||
</Root>
|
||||
);
|
||||
};
|
||||
|
||||
export default Labels;
|
||||
|
||||
Loading…
Reference in New Issue