Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LanguageSwitcher to use the ButtonClass parameter #4193

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@if (ShowLanguageSwitcher)
{
<LanguageSwitcher DropdownAlignment="@LanguageDropdownAlignment" />
<LanguageSwitcher ButtonClass="@ButtonClass" DropdownAlignment="@LanguageDropdownAlignment" />
}

@if (_showEditMode || (PageState.Page.IsPersonalizable && PageState.User != null && UserSecurity.IsAuthorized(PageState.User, RoleNames.Registered)))
Expand Down
4 changes: 3 additions & 1 deletion Oqtane.Client/Themes/Controls/Theme/LanguageSwitcher.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@if (_supportedCultures?.Count() > 1)
{
<div class="btn-group pe-1" role="group">
<button id="btnCultures" type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button id="btnCultures" type="button" class="btn @ButtonClass dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="oi oi-globe"></span>
</button>
<div class="dropdown-menu @MenuAlignment" aria-labelledby="btnCultures">
Expand All @@ -35,6 +35,8 @@

[Parameter]
public string DropdownAlignment { get; set; } = string.Empty; // Empty or Left or Right
[Parameter]
public string ButtonClass { get; set; } = "btn-outline-secondary";

[CascadingParameter]
HttpContext HttpContext { get; set; }
Expand Down