Skip to content

Commit 11166d3

Browse files
committed
Warning when push or pull properties are used
1 parent 83522f8 commit 11166d3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

core/src/components/col/col.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const BREAKPOINTS = ['', 'xs', 'sm', 'md', 'lg', 'xl'];
1919
shadow: true,
2020
})
2121
export class Col implements ComponentInterface {
22+
23+
@Element() el!: HTMLIonColElement;
2224
/**
2325
* The amount to offset the column, in terms of how many columns it should shift to the end
2426
* of the total available.
@@ -263,6 +265,18 @@ export class Col implements ComponentInterface {
263265
return this.getStyleClass('offset', 'ion-grid-offset');
264266
}
265267

268+
componentDidLoad() {
269+
if(
270+
this.pull || this.pullLg || this.pullMd || this.pullSm || this.pullXl || this.pullXs ||
271+
this.push || this.pushLg || this.pushMd || this.pushSm || this.pushXl || this.pushXs
272+
) {
273+
printIonWarning(
274+
'[ion-col] - The pull and push properties are deprecated and no longer work, in favor of the order and size properties.',
275+
this.el
276+
);
277+
}
278+
}
279+
266280
render() {
267281
const theme = getIonTheme(this);
268282

0 commit comments

Comments
 (0)