Skip to content

Commit

Permalink
fix(TDOPS-5762): fix DS accordion that would submit forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoffroy Baccarini committed Nov 30, 2023
1 parent bd152f9 commit b6b1e49
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rich-kangaroos-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/design-system': patch
---

TDOPS-5762 - Fix Design System accordion button that would submit a form
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { forwardRef, ReactChild, Ref } from 'react';

import classnames from 'classnames';

import tokens from '@talend/design-tokens';

import { ButtonIcon } from '../../ButtonIcon';
import { SizedIcon } from '../../Icon';
import { Divider } from '../../Divider';
import { SizedIcon } from '../../Icon';
import { StackHorizontal } from '../../Stack';
import { Status } from '../../Status';
import { variants } from '../../Status/Primitive/StatusPrimitive';

import { PanelHeaderAction } from './types';

import styles from './CollapsiblePanelHeader.module.scss';

export type CollapsiblePanelHeaderPropsType = {
Expand Down Expand Up @@ -149,6 +150,7 @@ const CollapsiblePanelHeader = forwardRef(
ref={ref}
data-test="panel.header"
data-testid="panel.header"
type="button"
>
{getContent()}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ exports[`Accordion should render a11y html 1`] = `
data-test="panel.header"
data-testid="panel.header"
id="CollapsiblePanel__control--id-mocked-uuid-0"
type="button"
>
<div
class="theme-iconWrapper"
Expand Down Expand Up @@ -67,6 +68,7 @@ exports[`Accordion should render a11y html 1`] = `
data-test="panel.header"
data-testid="panel.header"
id="CollapsiblePanel__control--id-mocked-uuid-1"
type="button"
>
<div
class="theme-iconWrapper"
Expand Down Expand Up @@ -122,6 +124,7 @@ exports[`Accordion should render a11y html 1`] = `
data-test="panel.header"
data-testid="panel.header"
id="CollapsiblePanel__control--id-mocked-uuid-2"
type="button"
>
<div
class="theme-iconWrapper"
Expand Down Expand Up @@ -192,6 +195,7 @@ exports[`Accordion should render a11y html 1`] = `
data-test="panel.header"
data-testid="panel.header"
id="CollapsiblePanel__control--id-mocked-uuid-3"
type="button"
>
<div
class="theme-iconWrapper"
Expand Down Expand Up @@ -247,6 +251,7 @@ exports[`Accordion should render a11y html 1`] = `
data-test="panel.header"
data-testid="panel.header"
id="CollapsiblePanel__control--id-mocked-uuid-4"
type="button"
>
<div
class="theme-iconWrapper"
Expand Down

0 comments on commit b6b1e49

Please sign in to comment.