Skip to content

Commit 6682c25

Browse files
committed
Add the demo back.
1 parent 3342e8b commit 6682c25

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

libs/common-docs/src/lib/common/sidebar/sidebar.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<div class="bootstrap-version transition-option">
1010
<span class="transition-option" [class.hideText]="!menuIsOpened">Bootstrap: </span>
1111
<div class="flex-nowrap d-flex">
12+
<button class="btn" type="button" [class.selected]="_bsVersions.isBs3" (click)="installTheme('bs3')">3</button>
1213
<button class="btn" type="button" [class.selected]="_bsVersions.isBs4" (click)="installTheme('bs4')">4</button>
1314
<button class="btn" type="button" [class.selected]="_bsVersions.isBs5" (click)="installTheme('bs5')">5</button>
1415
</div>

libs/common-docs/src/lib/common/sidebar/sidebar.component.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { SIDEBAR_ROUTES } from '../../tokens/docs-sidebar-routes-token';
1515
import { initNestedRoutes } from './helpers/sidebar-helpers';
1616
import { Subscription } from "rxjs";
1717

18+
const _bs3Css = 'assets/css/bootstrap-3.3.7/css/bootstrap.min.css';
1819
const _bs4Css = 'assets/css/bootstrap-4.5.3/css/bootstrap.min.css';
1920
const _bs5Css = 'assets/css/bootstrap-5.2.3/css/bootstrap.min.css';
2021

@@ -32,11 +33,16 @@ export class SidebarComponent {
3233
@HostBinding('class.menuIsOpened') menuIsOpened = true;
3334

3435
get bsCssFile(): string {
35-
if (this.currentTheme === 'bs5') {
36-
return _bs5Css;
36+
switch (this.currentTheme) {
37+
case 'bs3':
38+
return _bs3Css;
39+
case 'bs4':
40+
return _bs4Css;
41+
case 'bs5':
42+
return _bs5Css;
43+
default:
44+
throw new Error('Unsupported theme');
3745
}
38-
39-
return _bs4Css;
4046
}
4147

4248
get _bsVersions(): IBsVersion {

0 commit comments

Comments
 (0)