Skip to content

Commit

Permalink
Update packages/components/src/components/post-language-switch/post-l…
Browse files Browse the repository at this point in the history
…anguage-switch.tsx

Co-authored-by: Lea <[email protected]>
  • Loading branch information
myrta2302 and leagrdv authored Jan 21, 2025
1 parent 6d5beff commit a756ab4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ export class PostLanguageSwitch {
private updateChildrenVariant() {
this.host.querySelectorAll('post-language-option').forEach(el => {
const isActive = el.getAttribute('active') === 'false';
if (this.variant === 'menu' && isActive) {
if (this.variant === 'list' || (this.variant === 'menu' && isActive)) {
el.setAttribute('variant', this.variant);
} else {
el.removeAttribute('variant');
if (this.variant !== 'menu') el.setAttribute('variant', this.variant);
}
});
}
Expand Down

0 comments on commit a756ab4

Please sign in to comment.