-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat:add panel iconbutton display * feat: add agent name * fix:useSkillsQuery
- Loading branch information
1 parent
7704696
commit 3a69cbf
Showing
8 changed files
with
59 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,54 @@ | ||
import React from "react"; | ||
import { Text, Input, VStack, FormControl, FormErrorMessage } from "@chakra-ui/react"; | ||
import { | ||
Input, | ||
VStack, | ||
FormControl, | ||
FormErrorMessage, | ||
IconButton, | ||
HStack, | ||
} from "@chakra-ui/react"; | ||
|
||
interface BasePropertiesProps { | ||
children: React.ReactNode; | ||
nodeName: string; | ||
onNameChange: (newName: string) => void; | ||
nameError: string | null; | ||
icon: React.ReactElement; | ||
colorScheme: string; | ||
} | ||
|
||
const BaseProperties: React.FC<BasePropertiesProps> = ({ children, nodeName, onNameChange, nameError }) => { | ||
const BaseProperties: React.FC<BasePropertiesProps> = ({ | ||
children, | ||
nodeName, | ||
onNameChange, | ||
nameError, | ||
icon, | ||
colorScheme, | ||
}) => { | ||
return ( | ||
<VStack spacing={4} align="stretch"> | ||
<FormControl isInvalid={!!nameError}> | ||
<Text fontWeight="bold" mb={2}>Node Name:</Text> | ||
<Input | ||
value={nodeName} | ||
onChange={(e) => onNameChange(e.target.value)} | ||
/> | ||
<HStack spacing={1} mb={1}> | ||
<IconButton | ||
aria-label="names" | ||
icon={icon} | ||
colorScheme={colorScheme} | ||
size="xs" | ||
/> | ||
<Input | ||
value={nodeName} | ||
onChange={(e) => onNameChange(e.target.value)} | ||
border={"1px solid white"} | ||
size={"sm"} | ||
fontWeight={"bold"} | ||
w={"50%"} | ||
/> | ||
</HStack> | ||
<FormErrorMessage>{nameError}</FormErrorMessage> | ||
</FormControl> | ||
{children} | ||
</VStack> | ||
); | ||
}; | ||
|
||
export default BaseProperties; | ||
export default BaseProperties; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters