|
|
@@ -9,8 +9,9 @@ class StyleGuideCtrl {
|
|
|
buttonNames = ['primary', 'secondary', 'inverse', 'success', 'warning', 'danger'];
|
|
|
buttonSizes = ['btn-small', '', 'btn-large'];
|
|
|
buttonVariants = ['-', '-outline-'];
|
|
|
+ icons: any = [];
|
|
|
page: any;
|
|
|
- pages = ['colors', 'buttons'];
|
|
|
+ pages = ['colors', 'buttons', 'icons'];
|
|
|
|
|
|
/** @ngInject **/
|
|
|
constructor(private $http, private $routeParams, private $location) {
|
|
|
@@ -26,6 +27,10 @@ class StyleGuideCtrl {
|
|
|
if (this.page.colors) {
|
|
|
this.loadColors();
|
|
|
}
|
|
|
+
|
|
|
+ if (this.page.icons) {
|
|
|
+ this.loadIcons();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
loadColors() {
|
|
|
@@ -36,6 +41,12 @@ class StyleGuideCtrl {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ loadIcons() {
|
|
|
+ this.$http.get('public/sass/icons.json').then(res => {
|
|
|
+ this.icons = res.data;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
switchTheme() {
|
|
|
this.$routeParams.theme = this.theme === 'dark' ? 'light' : 'dark';
|
|
|
this.$location.search(this.$routeParams);
|