You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
13
13
- if `count` is not a numeric value, it will use the default value as `1`
14
14
- if `animation` is not a valid attribute, it will use the default value as `progress`
15
15
- PS: The other values alredy have a fallback, so nothing to worry here
16
+
- Adding error feedback for `appearance` attribute in case of wrong configuration. Now it will show a error message on the console in case of receiving a wrong value
16
17
17
18
### Updated
18
19
19
20
- Adding `ngOnChange` to validate `count` input in case of changes via binding
21
+
- Updating `README.md` with information about `appearance` and `theme` usage.
Copy file name to clipboardExpand all lines: README.md
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,15 @@ export class YourAppComponent {}
118
118
119
119
- loadingText - _default_`Loading...`: attribute that defines the text value for `aria-valuetext` attribute. Defaults to "Loading..."
120
120
121
+
## Appearance
122
+
123
+
You can also define which appearance want to use in your skeleton loader by passing the options in your component via `[appearance]` attribute.
124
+
125
+
### Options
126
+
127
+
-`''` - _default_: it will use it `''` as appearance. At the end, it will render like a line, but line is not a expected appearance to be passed;
128
+
-`circle`: it will use `circle` as appearance. Great for avatar skeletons, for example :);
129
+
121
130
## Animations
122
131
123
132
You can also define which CSS animation you want to use - even not use any, if it's the case - in your skeleton loader by passing the options in your component via `[animation]` attribute.
@@ -178,6 +187,24 @@ you need to apply the style changes on the
178
187
</div>
179
188
```
180
189
190
+
The [theme] attribute now accepts the same configuration as `ngStyle` as well. That means you can manage to use like you're doing with the built-in directive, having a pleasure and beautiful experience
191
+
192
+
```html
193
+
<!--
194
+
Note that we are using a combination of styles and ngStyle inside theme object,
195
+
having `height.px` receiving a number and `background-color` receiving a HEX Color
196
+
-->
197
+
<divstyle="background: #FF0001; padding: 10px;">
198
+
<ngx-skeleton-loader
199
+
count="5"
200
+
[theme]="{
201
+
'height.px': 50,
202
+
'background-color': '#992929'
203
+
}"
204
+
></ngx-skeleton-loader>
205
+
</div>
206
+
```
207
+
181
208
### ⚠️ This is here only as a documentation, but it's not encouraged to be used. Please consider use it with caution ⚠️
182
209
183
210
Also, you can use CSS to add theme styles into your component. However, there are some implications:
0 commit comments