Skip to content

Commit 8699b1e

Browse files
committed
feat(toast): add the default styles for ionic theme
1 parent 9fc0d62 commit 8699b1e

File tree

6 files changed

+33
-7
lines changed

6 files changed

+33
-7
lines changed

core/src/components/toast/toast.scss renamed to core/src/components/toast/toast.common.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
@import "./toast.vars";
1+
@import "../../themes/mixins" ;
2+
@import "../../themes/functions.string";
23

34
// Toast
45
// --------------------------------------------------
@@ -53,10 +54,7 @@
5354

5455
color: var(--color);
5556

56-
font-family: $font-family-base;
57-
5857
contain: strict;
59-
z-index: $z-index-overlay;
6058
pointer-events: none;
6159
}
6260

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@use "../../themes/ionic/ionic.globals.scss" as globals;
2+
@use "./toast.common";
3+
4+
// Ionic Toast
5+
// --------------------------------------------------
6+
7+
:host {
8+
--background: #{globals.$ionic-color-neutral-1200};
9+
--border-radius: #{globals.$ionic-border-radius-400};
10+
--box-shadow: #{globals.$ionic-elevation-400};
11+
--button-color: #{globals.$ionic-color-base-white};
12+
--color: #{globals.$ionic-color-base-white};
13+
--max-width: 343px;
14+
--start: 8px;
15+
--end: 8px;
16+
17+
@include globals.typography(globals.$ionic-body-md-medium);
18+
19+
z-index: 1001;
20+
}

core/src/components/toast/toast.ios.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "./toast";
1+
@import "./toast.native";
22
@import "./toast.ios.vars";
33

44
// iOS Toast

core/src/components/toast/toast.md.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "./toast";
1+
@import "./toast.native";
22
@import "./toast.md.vars";
33

44
// Material Design Toast
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@use "./toast.common";
2+
@import "./toast.vars";
3+
4+
:host {
5+
font-family: $font-family-base;
6+
7+
z-index: $z-index-overlay;
8+
}

core/src/components/toast/toast.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import type {
6060
styleUrls: {
6161
ios: 'toast.ios.scss',
6262
md: 'toast.md.scss',
63-
ionic: 'toast.md.scss',
63+
ionic: 'toast.ionic.scss',
6464
},
6565
shadow: true,
6666
})

0 commit comments

Comments
 (0)