Skip to content

Commit 4e00a7a

Browse files
committed
fix: support for theme v2
1 parent e9b510b commit 4e00a7a

File tree

9 files changed

+10
-38
lines changed

9 files changed

+10
-38
lines changed
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
/*
2-
In NativeScript, the app.css file is where you place CSS rules that
3-
you would like to apply to your entire application. Check out
4-
http://docs.nativescript.org/ui/styling for a full list of the CSS
5-
selectors and properties you can use to style UI components.
1+
@import "~@nativescript/theme/css/core.css";
2+
@import "~@nativescript/theme/css/blue.css";
63

7-
/*
8-
In many cases you may want to use the NativeScript core theme instead
9-
of writing your own CSS rules. For a full list of class names in the theme
10-
refer to http://docs.nativescript.org/ui/theme.
11-
*/
12-
@import '~nativescript-theme-core/css/core.light.css';
4+
/* Place any CSS rules you want to apply on both iOS and Android here.
5+
This is where the vast majority of your CSS code goes. */

src/add-ns/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ const addDependencies = () => (tree: Tree, context: SchematicContext) => {
363363
// @UPGRADE: Update all versions whenever {N} version updates
364364
const depsToAdd = {
365365
'nativescript-angular': '~8.20.0',
366-
'nativescript-theme-core': '~1.0.4',
366+
'@nativescript/theme': '~2.2.0',
367367
'reflect-metadata': '~0.1.12',
368368
'tns-core-modules': '~6.2.0',
369369
'tslib': '1.10.0',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--The content below is only a placeholder and can be replaced.-->
22
<StackLayout<% if (theme) { %> class="p-20"<% } %>>
33
<Label text="Tap the button"<% if (theme) { %> class="h1 text-center"<% } %>></Label>
4-
<Button text="TAP" (tap)="onTap()"<% if (theme) { %> class="btn btn-primary btn-active"<% } %>></Button>
4+
<Button text="TAP" (tap)="onTap()"<% if (theme) { %> class="-primary"<% } %>></Button>
55
<Label [text]="getMessage()"<% if (theme) { %> class="h2 text-center"<% } %> textWrap="true"></Label>
66
</StackLayout>

src/ng-new/application/_files/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@angular/platform-browser-dynamic": "~8.2.0",
1717
"@angular/router": "~8.2.0",
1818
"nativescript-angular": "~8.20.0",<% if(theme) { %>
19-
"nativescript-theme-core": "~1.0.4",
19+
"@nativescript/theme": "~2.2.0",
2020
<% } %>"reflect-metadata": "~0.1.12",
2121
"rxjs": "~6.4.0",
2222
"tns-core-modules": "~6.2.0",

src/ng-new/shared/_files/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@angular/router": "~8.2.0",
3030
"core-js": "^2.6.9",
3131
"nativescript-angular": "~8.20.0",<% if(theme) { %>
32-
"nativescript-theme-core": "~1.0.4",
32+
"@nativescript/theme": "~2.2.0",
3333
<% } %>"reflect-metadata": "~0.1.12",
3434
"rxjs": "~6.4.0",
3535
"tns-core-modules": "~6.2.0",

src/styling/_css-files/app.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<% if (theme) { %>
2-
@import '~nativescript-theme-core/css/core.light.css';
2+
@import '~@nativescript/theme/css/core.css';
3+
@import '~@nativescript/theme/css/blue.css';
34
<% } %>

src/styling/_scss-files/_app-variables.scss

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/styling/_scss-files/app.android.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Import app variables
2-
@import 'app-variables';
3-
<% if (theme) { %>
4-
// Import the theme’s main ruleset - both index and platform specific.
5-
@import '~nativescript-theme-core/scss/index';
6-
@import '~nativescript-theme-core/scss/platforms/index.android';
7-
<% } %>
81
// Import common styles
92
@import 'app-common';
103

src/styling/_scss-files/app.ios.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Import app variables
2-
@import 'app-variables';
3-
<% if (theme) { %>
4-
// Import the theme’s main ruleset - both index and platform specific.
5-
@import '~nativescript-theme-core/scss/index';
6-
@import '~nativescript-theme-core/scss/platforms/index.ios';
7-
<% } %>
81
// Import common styles
92
@import 'app-common';
103

0 commit comments

Comments
 (0)