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
|
//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 [key, setKey] = useState("");
|
||||||
const [value, setValue] = useState("");
|
const [value, setValue] = useState("");
|
||||||
const [type, setType] = useState("Generic");
|
const [type, setType] = useState("Generic");
|
||||||
|
|
@ -87,7 +93,7 @@ export default function AddNewVariableButton({ children }): JSX.Element {
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
</BaseModal.Header>
|
</BaseModal.Header>
|
||||||
<BaseModal.Trigger asChild>{children}</BaseModal.Trigger>
|
<BaseModal.Trigger asChild={asChild}>{children}</BaseModal.Trigger>
|
||||||
<BaseModal.Content>
|
<BaseModal.Content>
|
||||||
<div className="flex h-full w-full flex-col gap-4 align-middle">
|
<div className="flex h-full w-full flex-col gap-4 align-middle">
|
||||||
<Label>Variable Name</Label>
|
<Label>Variable Name</Label>
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ export default function GlobalVariablesPage() {
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-shrink-0 items-center gap-2">
|
<div className="flex flex-shrink-0 items-center gap-2">
|
||||||
<AddNewVariableButton>
|
<AddNewVariableButton asChild>
|
||||||
<Button data-testid="api-key-button-store" variant="primary">
|
<Button data-testid="api-key-button-store" variant="primary">
|
||||||
<IconComponent name="Plus" className="w-4" />
|
<IconComponent name="Plus" className="w-4" />
|
||||||
Add New
|
Add New
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue