Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions angular/src/directives/proxies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,15 +729,15 @@ export class IonSelectOption {
proxyInputs(IonSelectOption, ['disabled', 'selected', 'value']);

export declare interface IonSkeletonText extends Components.IonSkeletonText {}
@Component({ selector: 'ion-skeleton-text', changeDetection: ChangeDetectionStrategy.OnPush, template: '<ng-content></ng-content>', inputs: ['animated', 'width'] })
@Component({ selector: 'ion-skeleton-text', changeDetection: ChangeDetectionStrategy.OnPush, template: '<ng-content></ng-content>', inputs: ['animated'] })
export class IonSkeletonText {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
}
}
proxyInputs(IonSkeletonText, ['animated', 'width']);
proxyInputs(IonSkeletonText, ['animated']);

export declare interface IonSlide extends Components.IonSlide {}
@Component({ selector: 'ion-slide', changeDetection: ChangeDetectionStrategy.OnPush, template: '<ng-content></ng-content>' })
Expand Down
1 change: 0 additions & 1 deletion core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,6 @@ ion-select-option,prop,value,any,undefined,false,false

ion-skeleton-text,shadow
ion-skeleton-text,prop,animated,boolean,false,false,false
ion-skeleton-text,prop,width,string | undefined,undefined,false,false
ion-skeleton-text,css-prop,--background
ion-skeleton-text,css-prop,--background-rgb
ion-skeleton-text,css-prop,--border-radius
Expand Down
8 changes: 0 additions & 8 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2360,10 +2360,6 @@ export namespace Components {
* If `true`, the skeleton text will animate.
*/
'animated': boolean;
/**
* @deprecated Use CSS instead. The width of the skeleton text. If supplied, it will override the CSS style.
*/
'width'?: string;
}
interface IonSlide {}
interface IonSlides {
Expand Down Expand Up @@ -5649,10 +5645,6 @@ declare namespace LocalJSX {
* If `true`, the skeleton text will animate.
*/
'animated'?: boolean;
/**
* @deprecated Use CSS instead. The width of the skeleton text. If supplied, it will override the CSS style.
*/
'width'?: string;
}
interface IonSlide {}
interface IonSlides {
Expand Down
7 changes: 3 additions & 4 deletions core/src/components/skeleton-text/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,9 @@ export const SkeletonTextExample: React.FC = () => {

## Properties

| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ----------- |
| `animated` | `animated` | If `true`, the skeleton text will animate. | `boolean` | `false` |
| `width` | `width` | <span style="color:red">**[DEPRECATED]**</span> Use CSS instead. The width of the skeleton text. If supplied, it will override the CSS style.<br/><br/> | `string \| undefined` | `undefined` |
| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | ------------------------------------------ | --------- | ------- |
| `animated` | `animated` | If `true`, the skeleton text will animate. | `boolean` | `false` |


## CSS Custom Properties
Expand Down
21 changes: 0 additions & 21 deletions core/src/components/skeleton-text/skeleton-text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,6 @@ export class SkeletonText implements ComponentInterface {
*/
@Prop() animated = false;

/**
* @deprecated Use CSS instead. The width of the skeleton text. If supplied, it will override the CSS style.
*/
@Prop() width?: string;

calculateWidth() {
// If width was passed in to the property use that first
// tslint:disable-next-line: deprecation
if (this.width !== undefined) {
return {
style: {
// tslint:disable-next-line: deprecation
width: this.width
}
};
}

return;
}

render() {
const animated = this.animated && config.getBoolean('animated', true);
const inMedia = hostContext('ion-avatar', this.el) || hostContext('ion-thumbnail', this.el);
Expand All @@ -50,7 +30,6 @@ export class SkeletonText implements ComponentInterface {
'skeleton-text-animated': animated,
'in-media': inMedia
}}
{...this.calculateWidth()}
>
<span>&nbsp;</span>
</Host>
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/skeleton-text/test/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h3>

<ion-list>
<ion-list-header>
<ion-skeleton-text width="20%"></ion-skeleton-text>
<ion-skeleton-text style="width: 20%"></ion-skeleton-text>
</ion-list-header>
<ion-item>
<ion-avatar slot="start">
Expand Down
9 changes: 3 additions & 6 deletions core/src/components/skeleton-text/test/custom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,23 @@
<ion-content>
<header>Default</header>
<div class="ion-padding">
<!-- width should not be used a prop but make sure it works for backwards compatibility -->
<ion-skeleton-text width="88%"></ion-skeleton-text>
<ion-skeleton-text style="width: 88%"></ion-skeleton-text>
<ion-skeleton-text class="tiny"></ion-skeleton-text>
<ion-skeleton-text style="width: 60%"></ion-skeleton-text>
<ion-skeleton-text animated class="tiny"></ion-skeleton-text>
<ion-skeleton-text animated></ion-skeleton-text>
</div>
<header>Custom RGB Background</header>
<div class="ion-padding custom-skeleton-color">
<!-- width should not be used a prop but make sure it works for backwards compatibility -->
<ion-skeleton-text width="88%"></ion-skeleton-text>
<ion-skeleton-text style="width: 88%"></ion-skeleton-text>
<ion-skeleton-text class="tiny"></ion-skeleton-text>
<ion-skeleton-text style="width: 60%"></ion-skeleton-text>
<ion-skeleton-text animated class="tiny"></ion-skeleton-text>
<ion-skeleton-text animated></ion-skeleton-text>
</div>
<header>Global Text Color Dark Theme</header>
<div class="ion-padding custom-skeleton-dark">
<!-- width should not be used a prop but make sure it works for backwards compatibility -->
<ion-skeleton-text width="88%"></ion-skeleton-text>
<ion-skeleton-text style="width: 88%"></ion-skeleton-text>
<ion-skeleton-text class="tiny"></ion-skeleton-text>
<ion-skeleton-text style="width: 60%"></ion-skeleton-text>
<ion-skeleton-text animated class="tiny"></ion-skeleton-text>
Expand Down