-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(kit): Skeleton
add new directive
#6934
Conversation
Pull request was closed ✔️All saved screenshots (for current PR) were deleted 🗑️ |
Visit the preview URL for this PR (updated for commit 7dd0e3d): https://taiga-ui--pr6934-skeleton-c6qeypzv.web.app (expires Tue, 19 Mar 2024 12:18:07 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 4b5ece1e114386f6a105425ef799091475b249eb |
BundleMonFiles updated (2)
Unchanged files (3)
Total files change +609B +0.1% Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
projects/demo/src/modules/directives/skeleton/examples/2/index.html
Outdated
Show resolved
Hide resolved
projects/demo/src/modules/directives/skeleton/examples/2/index.less
Outdated
Show resolved
Hide resolved
<p> | ||
<span | ||
[tuiSkeleton]=" | ||
skeleton | ||
? 'This text serves as the content behind the skeleton and depending on its length, the skeleton will adjust to fit it.' | ||
: '' | ||
" | ||
> | ||
{{ skeleton ? '' : 'This text will be replaced by a placeholder.' }} | ||
</span> | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this additional nesting is really required ?
Could we simplify example ?
<p> | |
<span | |
[tuiSkeleton]=" | |
skeleton | |
? 'This text serves as the content behind the skeleton and depending on its length, the skeleton will adjust to fit it.' | |
: '' | |
" | |
> | |
{{ skeleton ? '' : 'This text will be replaced by a placeholder.' }} | |
</span> | |
</p> | |
<p | |
[tuiSkeleton]=" | |
skeleton | |
? 'This text serves as the content behind the skeleton and depending on its length, the skeleton will adjust to fit it.' | |
: '' | |
" | |
> | |
{{ skeleton ? '' : 'This text will be replaced by a placeholder.' }} | |
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is there so the background is only where the text is — span
is inline
.
public ngOnChanges({tuiSkeleton}: SimpleChanges): void { | ||
this.animation?.cancel(); | ||
|
||
if (!tuiSkeleton.currentValue && !tuiSkeleton.firstChange) { | ||
this.animation = this.el.animate(FADE, this.duration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Closes #