Spaces:
Build error
Build error
File size: 1,336 Bytes
3382f47 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
import React, { useState } from "react";
import tw from "tailwind-styled-components";
interface CurrentEnvProps {
data: any;
}
const CurrentEnv: React.FC<CurrentEnvProps> = ({ data }) => {
const [agentName, setAgentName] = useState<string>("mini-agi");
const [reportLocation, setReportLocation] = useState<string>(
"../reports/mini-agi"
);
const [openAiKey, setOpenAiKey] = useState<string>();
return (
<CurrentEnvContainer>
<Title>Env Variables</Title>
<EnvWrapper>
<EnvLabel>Agent Name</EnvLabel>
<EnvInput
onChange={(e) => setAgentName(e.targetValue)}
placeholder="mini-agi"
/>
</EnvWrapper>
<EnvWrapper>
<EnvLabel>Report Location</EnvLabel>
<EnvInput placeholder="Location from root" />
</EnvWrapper>
<EnvWrapper>
<EnvLabel>OpenAI Key</EnvLabel>
<EnvInput type="password" placeholder="sk-" />
</EnvWrapper>
</CurrentEnvContainer>
);
};
export default CurrentEnv;
const CurrentEnvContainer = tw.div`
w-full
h-full
flex
flex-col
justify-center
`;
const Title = tw.h3`
font-bold
text-lg
text-center
`;
const EnvWrapper = tw.div`
flex
mt-4
justify-between
items-center
`;
const EnvLabel = tw.label`
`;
const EnvInput = tw.input`
border
rounded
px-2
`;
|