Fixed Add New Variable button not working at the dropdown
This commit is contained in:
parent
40f42db9a8
commit
50aa95a0b7
2 changed files with 9 additions and 3 deletions
|
|
@ -14,7 +14,13 @@ import sortByName from "./utils/sort-by-name";
|
|||
|
||||
//TODO IMPLEMENT FORM LOGIC
|
||||
|
||||
export default function AddNewVariableButton({ children }): JSX.Element {
|
||||
export default function AddNewVariableButton({
|
||||
children,
|
||||
asChild,
|
||||
}: {
|
||||
children: JSX.Element;
|
||||
asChild?: boolean;
|
||||
}): JSX.Element {
|
||||
const [key, setKey] = useState("");
|
||||
const [value, setValue] = useState("");
|
||||
const [type, setType] = useState("Generic");
|
||||
|
|
@ -87,7 +93,7 @@ export default function AddNewVariableButton({ children }): JSX.Element {
|
|||
aria-hidden="true"
|
||||
/>
|
||||
</BaseModal.Header>
|
||||
<BaseModal.Trigger asChild>{children}</BaseModal.Trigger>
|
||||
<BaseModal.Trigger asChild={asChild}>{children}</BaseModal.Trigger>
|
||||
<BaseModal.Content>
|
||||
<div className="flex h-full w-full flex-col gap-4 align-middle">
|
||||
<Label>Variable Name</Label>
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ export default function GlobalVariablesPage() {
|
|||
</p>
|
||||
</div>
|
||||
<div className="flex flex-shrink-0 items-center gap-2">
|
||||
<AddNewVariableButton>
|
||||
<AddNewVariableButton asChild>
|
||||
<Button data-testid="api-key-button-store" variant="primary">
|
||||
<IconComponent name="Plus" className="w-4" />
|
||||
Add New
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue