mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 01:03:03 +08:00
feat(badge): add hue property for the ionic theme (#30307)
Issue number: internal --------- ## What is the current behavior? The badge component does not support the `hue` property. ## What is the new behavior? Adds support for the `subtle` hue for the badge. Defaults to `subtle` when the badge contains icon or text. Defaults to `bold` when the badge is empty or when it is inside of a button or tab button. ## Does this introduce a breaking change? - [ ] Yes - [x] No
This commit is contained in:
@ -261,14 +261,14 @@ export declare interface IonBackdrop extends Components.IonBackdrop {
|
||||
|
||||
|
||||
@ProxyCmp({
|
||||
inputs: ['color', 'mode', 'shape', 'size', 'theme', 'vertical']
|
||||
inputs: ['color', 'hue', 'mode', 'shape', 'size', 'theme', 'vertical']
|
||||
})
|
||||
@Component({
|
||||
selector: 'ion-badge',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: '<ng-content></ng-content>',
|
||||
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
||||
inputs: ['color', 'mode', 'shape', 'size', 'theme', 'vertical'],
|
||||
inputs: ['color', 'hue', 'mode', 'shape', 'size', 'theme', 'vertical'],
|
||||
})
|
||||
export class IonBadge {
|
||||
protected el: HTMLIonBadgeElement;
|
||||
|
@ -350,14 +350,14 @@ export declare interface IonBackdrop extends Components.IonBackdrop {
|
||||
|
||||
@ProxyCmp({
|
||||
defineCustomElementFn: defineIonBadge,
|
||||
inputs: ['color', 'mode', 'shape', 'size', 'theme', 'vertical']
|
||||
inputs: ['color', 'hue', 'mode', 'shape', 'size', 'theme', 'vertical']
|
||||
})
|
||||
@Component({
|
||||
selector: 'ion-badge',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: '<ng-content></ng-content>',
|
||||
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
||||
inputs: ['color', 'mode', 'shape', 'size', 'theme', 'vertical'],
|
||||
inputs: ['color', 'hue', 'mode', 'shape', 'size', 'theme', 'vertical'],
|
||||
standalone: true
|
||||
})
|
||||
export class IonBadge {
|
||||
|
Reference in New Issue
Block a user