Skip to content

Commit

Permalink
fix: fix to stop Accordion interaction submitting an wrapping form (#679
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AndyEPhipps authored Oct 31, 2024
1 parent dd43bf3 commit 3655ca1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Molecules/Accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const Accordion = ({

return (
<Container {...rest}>
<Button onClick={handleOpen} aria-expanded={isOpen ? 'true' : 'false'} ChevronKeyframes={ChevronKeyframes}>
<Button onClick={handleOpen} aria-expanded={isOpen ? 'true' : 'false'} ChevronKeyframes={ChevronKeyframes} type="button">
{title}
<Icon>
<Chevron colour="black" direction={isOpen ? 'up' : 'down'} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ exports[`renders correctly 1`] = `
aria-expanded="false"
className="c1"
onClick={[Function]}
type="button"
>
<h2
className="c2"
Expand Down

0 comments on commit 3655ca1

Please sign in to comment.