Skip to content

Commit 1605337

Browse files
fix(accordian): update color for pressed state
1 parent fe79a5a commit 1605337

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/src/components/accordion/accordion.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@ export class Accordion implements ComponentInterface {
200200
if (ionItem.lines === undefined) {
201201
ionItem.lines = 'full';
202202
}
203+
204+
/**
205+
* Set the pressed state background color for ionic theme.
206+
* This overrides the default blue color from ion-item.
207+
*/
208+
const theme = getIonTheme(this);
209+
if (theme === 'ionic') {
210+
ionItem.style.setProperty('--background-activated', 'var(--token-bg-neutral-subtlest-press)');
211+
}
203212
};
204213

205214
private getSlottedHeaderIonItem = () => {

0 commit comments

Comments
 (0)