-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
104 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 23 additions & 21 deletions
44
blazorbootstrap/Components/ThemeSwitcher/ThemeSwitcher.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
@namespace BlazorBootstrap | ||
@inherits BlazorBootstrapComponentBase | ||
|
||
<button class="btn btn-link nav-link py-2 px-0 px-lg-2 dropdown-toggle d-flex align-items-center" id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" data-bs-display="static" aria-label="Toggle theme (light)"> | ||
<span class="blazorbootstrap-theme-indicator"><i class="bi bi-sun-fill"></i></span> | ||
<span class="d-lg-none ms-2" id="bd-theme-text">Toggle theme</span> | ||
</button> | ||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme-text"> | ||
<li class="blazorbootstrap-theme-item px-1"> | ||
<button type="button" class="dropdown-item d-flex align-items-center active rounded" data-bs-theme-value="light" aria-pressed="true" @onclick="SetLightTheme"> | ||
<i class="bi bi-sun-fill me-2"></i>Light<i class="bi bi-check2 ms-auto"></i> | ||
</button> | ||
</li> | ||
<li class="blazorbootstrap-theme-item px-1"> | ||
<button type="button" class="dropdown-item d-flex align-items-center rounded" data-bs-theme-value="dark" aria-pressed="false" @onclick="SetDarkTheme"> | ||
<i class="bi bi-moon-stars-fill me-2"></i>Dark<i class="bi bi-check2 d-none ms-auto"></i> | ||
</button> | ||
</li> | ||
<li class="blazorbootstrap-theme-item px-1"> | ||
<button type="button" class="dropdown-item d-flex align-items-center rounded" data-bs-theme-value="auto" aria-pressed="false" @onclick="SetAutoTheme"> | ||
<i class="bi bi-circle-half me-2"></i>Auto<i class="bi bi-check2 d-none ms-auto"></i> | ||
</button> | ||
</li> | ||
</ul> | ||
<div class="dropdown"> | ||
<button class="btn btn-link nav-link py-2 px-0 px-lg-2 dropdown-toggle d-flex align-items-center" id="bb-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" data-bs-display="static" aria-label="Toggle theme (light)"> | ||
<span class="blazorbootstrap-theme-indicator"><i class="bi bi-sun-fill"></i></span> | ||
<span class="d-none ms-2" id="bb-theme-text">Toggle theme</span> | ||
</button> | ||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bb-theme-text"> | ||
<li class="blazorbootstrap-theme-item px-1"> | ||
<button type="button" class="dropdown-item d-flex align-items-center active rounded" data-bs-theme-value="light" aria-pressed="true" @onclick="SetLightTheme"> | ||
<i class="bi bi-sun-fill me-2"></i>Light<i class="bi bi-check2 ms-auto"></i> | ||
</button> | ||
</li> | ||
<li class="blazorbootstrap-theme-item px-1"> | ||
<button type="button" class="dropdown-item d-flex align-items-center rounded" data-bs-theme-value="dark" aria-pressed="false" @onclick="SetDarkTheme"> | ||
<i class="bi bi-moon-stars-fill me-2"></i>Dark<i class="bi bi-check2 d-none ms-auto"></i> | ||
</button> | ||
</li> | ||
<li class="blazorbootstrap-theme-item px-1"> | ||
<button type="button" class="dropdown-item d-flex align-items-center rounded" data-bs-theme-value="system" aria-pressed="false" @onclick="SetAutoTheme"> | ||
<i class="bi bi-circle-half me-2"></i>Auto<i class="bi bi-check2 d-none ms-auto"></i> | ||
</button> | ||
</li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.