Skip to content

Commit e2cf0e4

Browse files
committed
feat(item-divider): remove theme usage
1 parent 38145a3 commit e2cf0e4

5 files changed

Lines changed: 7 additions & 19 deletions

File tree

core/api.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,6 @@ ion-item-divider,shadow
12441244
ion-item-divider,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
12451245
ion-item-divider,prop,mode,"ios" | "md",undefined,false,false
12461246
ion-item-divider,prop,sticky,boolean,false,false,false
1247-
ion-item-divider,prop,theme,"ios" | "md" | "ionic",undefined,false,false
12481247
ion-item-divider,css-prop,--background
12491248
ion-item-divider,css-prop,--color
12501249
ion-item-divider,css-prop,--inner-padding-bottom

core/src/components.d.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,10 +1920,6 @@ export namespace Components {
19201920
* @default false
19211921
*/
19221922
"sticky": boolean;
1923-
/**
1924-
* The theme determines the visual appearance of the component.
1925-
*/
1926-
"theme"?: "ios" | "md" | "ionic";
19271923
}
19281924
interface IonItemGroup {
19291925
/**
@@ -7918,10 +7914,6 @@ declare namespace LocalJSX {
79187914
* @default false
79197915
*/
79207916
"sticky"?: boolean;
7921-
/**
7922-
* The theme determines the visual appearance of the component.
7923-
*/
7924-
"theme"?: "ios" | "md" | "ionic";
79257917
}
79267918
interface IonItemGroup {
79277919
/**

core/src/components/item-divider/item-divider.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import type { ComponentInterface } from '@stencil/core';
22
import { Component, Element, Host, Prop, h } from '@stencil/core';
33
import { createColorClasses } from '@utils/theme';
44

5-
import { getIonTheme } from '../../global/ionic-global';
65
import type { Color } from '../../interface';
76

87
/**
98
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
10-
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
119
*
1210
* @slot - Content is placed between the named slots if provided without a slot.
1311
* @slot start - Content is placed to the left of the divider text in LTR, and to the right in RTL.
@@ -38,13 +36,12 @@ export class ItemDivider implements ComponentInterface {
3836
@Prop() sticky = false;
3937

4038
render() {
41-
const theme = getIonTheme(this);
39+
const { color, sticky } = this;
4240

4341
return (
4442
<Host
45-
class={createColorClasses(this.color, {
46-
[theme]: true,
47-
'item-divider-sticky': this.sticky,
43+
class={createColorClasses(color, {
44+
'item-divider-sticky': sticky,
4845
item: true,
4946
})}
5047
>

packages/angular/src/directives/proxies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,14 +1150,14 @@ export declare interface IonItem extends Components.IonItem {}
11501150

11511151

11521152
@ProxyCmp({
1153-
inputs: ['color', 'mode', 'sticky', 'theme']
1153+
inputs: ['color', 'mode', 'sticky']
11541154
})
11551155
@Component({
11561156
selector: 'ion-item-divider',
11571157
changeDetection: ChangeDetectionStrategy.OnPush,
11581158
template: '<ng-content></ng-content>',
11591159
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1160-
inputs: ['color', 'mode', 'sticky', 'theme'],
1160+
inputs: ['color', 'mode', 'sticky'],
11611161
})
11621162
export class IonItemDivider {
11631163
protected el: HTMLIonItemDividerElement;

packages/angular/standalone/src/directives/proxies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,14 +1058,14 @@ export declare interface IonItem extends Components.IonItem {}
10581058

10591059
@ProxyCmp({
10601060
defineCustomElementFn: defineIonItemDivider,
1061-
inputs: ['color', 'mode', 'sticky', 'theme']
1061+
inputs: ['color', 'mode', 'sticky']
10621062
})
10631063
@Component({
10641064
selector: 'ion-item-divider',
10651065
changeDetection: ChangeDetectionStrategy.OnPush,
10661066
template: '<ng-content></ng-content>',
10671067
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1068-
inputs: ['color', 'mode', 'sticky', 'theme'],
1068+
inputs: ['color', 'mode', 'sticky'],
10691069
standalone: true
10701070
})
10711071
export class IonItemDivider {

0 commit comments

Comments
 (0)