Skip to content

Commit

Permalink
fix(accordion)!: remove BaseAccordion
Browse files Browse the repository at this point in the history
Closes #2612

fix(accordion): expand logic

refactor(accordion): prevent circular imports
  • Loading branch information
bennypowers committed Jun 10, 2024
1 parent 77dff66 commit af07dc2
Show file tree
Hide file tree
Showing 11 changed files with 535 additions and 599 deletions.
32 changes: 32 additions & 0 deletions .changeset/hip-coins-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@patternfly/elements": major
---
`<pf-accordion>`: Removed `BaseAccordion*` classes, as well as static `isPanel`, `isHeader`, and `isAccordion` methods. Removed the optional `parentAccordion` parameter to `PfAccordion#expand(index)`. Renamed accordion event classes by adding the `Pf` prefix:

**Before**:

```js
import {
AccordionHeaderChangeEvent
} from '@patternfly/elements/pf-accordion/pf-accordion.js';

addEventListener('change', function(event) {
if (event instanceof AccordionHeaderChangeEvent) {
// ...
}
});
```

**After**:

```js
import {
PfAccordionHeaderChangeEvent
} from '@patternfly/elements/pf-accordion/pf-accordion.js';

addEventListener('change', function(event) {
if (event instanceof PfAccordionHeaderChangeEvent) {
// ...
}
});
```
327 changes: 0 additions & 327 deletions elements/pf-accordion/BaseAccordion.ts

This file was deleted.

Loading

0 comments on commit af07dc2

Please sign in to comment.