Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: prevent default on buttons within accordion trigger in story

Scott Wilson0441e7958ba7
diff --git a/frontend/src/components/v3/generic/Accordion/Accordion.stories.tsx b/frontend/src/components/v3/generic/Accordion/Accordion.stories.tsx
index 1ef1fcfe2b..8b521ea8ab 100644
--- a/frontend/src/components/v3/generic/Accordion/Accordion.stories.tsx
+++ b/frontend/src/components/v3/generic/Accordion/Accordion.stories.tsx
@@ -127,7 +127,7 @@ export const GhostCard: Story = {
<DetailGroup>
<DetailGroupHeader className="flex items-center justify-between">
General
- <IconButton size="xs" variant="ghost-muted">
+ <IconButton size="xs" onClick={(e) => e.preventDefault()} variant="ghost-muted">
<EditIcon />
</IconButton>
</DetailGroupHeader>
@@ -159,7 +159,12 @@ export const GhostCard: Story = {
<AccordionItem value="configuration">
<AccordionTrigger className="relative">
Configuration
- <IconButton size="xs" className="absolute top-1.5 right-0" variant="ghost-muted">
+ <IconButton
+ size="xs"
+ onClick={(e) => e.preventDefault()}
+ className="absolute top-1.5 right-0"
+ variant="ghost-muted"
+ >
<EditIcon />
</IconButton>
</AccordionTrigger>
@@ -213,7 +218,12 @@ export const GhostCard: Story = {
<AccordionItem value="credentials">
<AccordionTrigger className="relative">
Credentials
- <IconButton size="xs" className="absolute top-1.5 right-0" variant="ghost-muted">
+ <IconButton
+ onClick={(e) => e.preventDefault()}
+ size="xs"
+ className="absolute top-1.5 right-0"
+ variant="ghost-muted"
+ >
<EditIcon />
</IconButton>
</AccordionTrigger>