Skip to content

Commit

Permalink
fix: add input param to LanguageSwitcherComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
stepobiz authored Oct 4, 2023
1 parent 97c5f64 commit bdb24e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<it-dropdown>
<it-dropdown [mode]="mode">
<ng-container button>
<span class="visually-hidden">{{'it.utils.selected' | translate: { lang: (currentLang$ | async)?.label } }}</span>
<span>{{(currentLang$ | async)?.label || ('it.utils.select-language' | translate)}}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export class ItLanguageSwitcherComponent implements OnInit {
*/
@Input() availableLanguages: Array<AvailableLanguage> | undefined;

/**
* Dropdown mode
*/
@Input() mode: 'button' | 'link' = 'link';

protected currentLang$: Observable<AvailableLanguage | undefined>;

constructor(
Expand Down

1 comment on commit bdb24e2

@vercel
Copy link

@vercel vercel bot commented on bdb24e2 Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.