Skip to content

Commit c19c29d

Browse files
committed
fix(toast): default hue should be subtle
1 parent db28e8b commit c19c29d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

core/api.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,6 +2428,7 @@ ion-toast,prop,duration,number,config.getNumber('toastDuration', 0),false,false
24282428
ion-toast,prop,enterAnimation,((baseEl: any, opts?: any) => Animation) | undefined,undefined,false,false
24292429
ion-toast,prop,header,string | undefined,undefined,false,false
24302430
ion-toast,prop,htmlAttributes,undefined | { [key: string]: any; },undefined,false,false
2431+
ion-toast,prop,hue,"bold" | "subtle" | undefined,'subtle',false,false
24312432
ion-toast,prop,icon,string | undefined,undefined,false,false
24322433
ion-toast,prop,isOpen,boolean,false,false,false
24332434
ion-toast,prop,keyboardClose,boolean,false,false,false

core/src/components/toast/test/colors/index.html renamed to core/src/components/toast/test/hue/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
demo purposes only.
3434
</p>
3535

36-
<button class="expand" onclick="openAllToasts(false)">Show All Bold Toasts</button>
37-
<button class="expand" onclick="openAllToasts(true)">Show All Subtle Toasts</button>
36+
<button class="expand" onclick="openAllToasts(false)">Show All Subtle Toasts</button>
37+
<button class="expand" onclick="openAllToasts(true)">Show All Bold Toasts</button>
3838
</ion-content>
3939

4040
<div id="toastBackdrop" class="backdrop"></div>
@@ -116,7 +116,7 @@
116116
}
117117

118118
// Show all toasts sequentially with a slight delay between each
119-
function openAllToasts(isSubtle) {
119+
function openAllToasts(isBold) {
120120
toastCount = 0;
121121
activeToasts = [];
122122

@@ -127,7 +127,7 @@
127127
buttons: [{ text: 'Action' }, { icon: 'close', role: 'cancel' }],
128128
color: item.color,
129129
icon: item.icon,
130-
...(isSubtle ? { hue: 'subtle' } : {}),
130+
...(isBold ? { hue: 'bold' } : {}),
131131
},
132132
index * 150
133133
);

core/src/components/toast/toast.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export class Toast implements ComponentInterface, OverlayInterface {
139139
* Set to `"bold"` for a toast with vibrant, bold colors or to `"subtle"` for
140140
* a toast with muted, subtle colors.
141141
*/
142-
@Prop() hue?: 'bold' | 'subtle' = 'bold';
142+
@Prop() hue?: 'bold' | 'subtle' = 'subtle';
143143

144144
/**
145145
* Defines how the message and buttons are laid out in the toast.

0 commit comments

Comments
 (0)