Skip to content

Commit c45e617

Browse files
committed
feat(accordion): update shape based on parent group shape
1 parent 28a7b53 commit c45e617

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

core/src/components/accordion/accordion.ionic.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,18 @@
5656
}
5757

5858
// Shape only applies when inside an inset accordion group
59-
:host(.in-accordion-group-expand-inset) ::slotted(ion-item[slot="header"]) {
59+
:host(.in-accordion-group-expand-inset.in-accordion-group-shape-round) ::slotted(ion-item[slot="header"]) {
6060
--border-radius: #{globals.$ion-border-radius-400};
6161
}
6262

63+
:host(.in-accordion-group-expand-inset.in-accordion-group-shape-soft) ::slotted(ion-item[slot="header"]) {
64+
--border-radius: #{globals.$ion-border-radius-200};
65+
}
66+
67+
:host(.in-accordion-group-expand-inset.in-accordion-group-shape-rectangular) ::slotted(ion-item[slot="header"]) {
68+
--border-radius: #{globals.$ion-border-radius-0};
69+
}
70+
6371
// Accordion Content
6472
// --------------------------------------------------
6573

core/src/components/accordion/accordion.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,9 @@ export class Accordion implements ComponentInterface {
444444
'accordion-animated': this.shouldAnimate(),
445445

446446
'in-accordion-group-expand-inset': hostContext('.accordion-group-expand-inset', this.el),
447+
'in-accordion-group-shape-round': hostContext('.accordion-group-shape-round', this.el),
448+
'in-accordion-group-shape-soft': hostContext('.accordion-group-shape-soft', this.el),
449+
'in-accordion-group-shape-rectangular': hostContext('.accordion-group-shape-rectangular', this.el),
447450
}}
448451
>
449452
<div

0 commit comments

Comments
 (0)