File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 9
9
< div class ="bootstrap-version transition-option ">
10
10
< span class ="transition-option " [class.hideText] ="!menuIsOpened "> Bootstrap: </ span >
11
11
< div class ="flex-nowrap d-flex ">
12
+ < button class ="btn " type ="button " [class.selected] ="_bsVersions.isBs3 " (click) ="installTheme('bs3') "> 3</ button >
12
13
< button class ="btn " type ="button " [class.selected] ="_bsVersions.isBs4 " (click) ="installTheme('bs4') "> 4</ button >
13
14
< button class ="btn " type ="button " [class.selected] ="_bsVersions.isBs5 " (click) ="installTheme('bs5') "> 5</ button >
14
15
</ div >
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { SIDEBAR_ROUTES } from '../../tokens/docs-sidebar-routes-token';
15
15
import { initNestedRoutes } from './helpers/sidebar-helpers' ;
16
16
import { Subscription } from "rxjs" ;
17
17
18
+ const _bs3Css = 'assets/css/bootstrap-3.3.7/css/bootstrap.min.css' ;
18
19
const _bs4Css = 'assets/css/bootstrap-4.5.3/css/bootstrap.min.css' ;
19
20
const _bs5Css = 'assets/css/bootstrap-5.2.3/css/bootstrap.min.css' ;
20
21
@@ -32,11 +33,16 @@ export class SidebarComponent {
32
33
@HostBinding ( 'class.menuIsOpened' ) menuIsOpened = true ;
33
34
34
35
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' ) ;
37
45
}
38
-
39
- return _bs4Css ;
40
46
}
41
47
42
48
get _bsVersions ( ) : IBsVersion {
You can’t perform that action at this time.
0 commit comments