Skip to content

Commit

Permalink
feat(schematics): add dark theme (#1534)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnixaa committed May 30, 2019
1 parent 3a0382c commit c5d15c6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
13 changes: 12 additions & 1 deletion src/framework/theme/schematics/ng-add/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,19 @@ const EXPECTED_THEME_SCSS = `@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/default';
$nb-themes: nb-register-theme((
// add your variables here like:
// color-bg: #4ca6ff,
// color-primary-100: #f2f6ff,
// color-primary-200: #d9e4ff,
// color-primary-300: #a6c1ff,
// color-primary-400: #598bff,
// color-primary-500: #3366ff,
// color-primary-600: #274bdb,
// color-primary-700: #1a34b8,
// color-primary-800: #102694,
// color-primary-900: #091c7a,
), default, default);
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,19 @@ export function createThemeContent(themeName: string): string {
@import '~@nebular/theme/styles/themes/${themeName}';
$nb-themes: nb-register-theme((
// add your variables here like:
// color-bg: #4ca6ff,
// color-primary-100: #f2f6ff,
// color-primary-200: #d9e4ff,
// color-primary-300: #a6c1ff,
// color-primary-400: #598bff,
// color-primary-500: #3366ff,
// color-primary-600: #274bdb,
// color-primary-700: #1a34b8,
// color-primary-800: #102694,
// color-primary-900: #091c7a,
), ${themeName}, ${themeName});
`;
}
Expand Down
4 changes: 2 additions & 2 deletions src/framework/theme/schematics/ng-add/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
}
},
"theme": {
"enum": ["default", "cosmic", "corporate"],
"description": "The theme which will be installed.",
"enum": ["default", "dark", "cosmic", "corporate"],
"description": "Visual theme to installed.",
"default": "default",
"x-prompt": "Which Nebular theme do you want to use:"
},
Expand Down
2 changes: 1 addition & 1 deletion src/framework/theme/schematics/ng-add/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

export interface Schema {
project: string;
theme: 'cosmic' | 'default' | 'corporate';
theme: 'default' | 'dark' | 'cosmic' | 'corporate';
customization: boolean;
layout: boolean;
animations: boolean;
Expand Down

0 comments on commit c5d15c6

Please sign in to comment.