Skip to content

Commit

Permalink
Update table loading UI
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Jan 12, 2024
1 parent 720a20c commit 2585e7c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 21 deletions.
33 changes: 26 additions & 7 deletions src/app/showcase/demo/deferreddemo.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
.demo-section-loading {
display: grid;
place-items: center;
padding: 2rem;
.deferred-demo-loading {
border-radius: 10px;
margin-bottom: 1rem;
font-size: 2rem;
height: 350px;
background: var(--maskbg);
position: relative;
overflow: hidden;
}

.deferred-demo-loading::after {
content: '';
animation: deferred-demo-loading 1.2s infinite;
left: 0;
position: absolute;
right: 0;
top: 0;
height: 100%;
transform: translateX(-100%);
z-index: 1;
border-radius: 10px;
background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--surface-100), rgba(255, 255, 255, 0));
}

@keyframes deferred-demo-loading {
from {
transform: translateX(-100%);
}
to {
transform: translateX(100%);
}
}
4 changes: 3 additions & 1 deletion src/app/showcase/demo/deferreddemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { Component, ElementRef, EventEmitter, Inject, Input, OnInit, Output, PLA
imports: [CommonModule],
template: `
@if(!visible){
<div class="demo-section-loading">Loading...</div>
<div class="card">
<div class="deferred-demo-loading"></div>
</div>
} @else {
<ng-content></ng-content>
}
Expand Down
26 changes: 13 additions & 13 deletions src/assets/showcase/data/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,10 @@
{
"name": "Data",
"children": [
{
"name": "Table",
"routerLink": "/table"
},
{
"name": "DataView",
"routerLink": "/dataview"
},
{
"name": "Scroller",
"routerLink": "/scroller"
},
{
"name": "OrderList",
"routerLink": "/orderlist"
Expand All @@ -180,17 +172,25 @@
"routerLink": "/picklist"
},
{
"name": "Tree",
"routerLink": "/tree"
"name": "Scroller",
"routerLink": "/scroller"
},
{
"name": "TreeTable",
"routerLink": "/treetable"
"name": "Table",
"routerLink": "/table"
},
{
"name": "Timeline",
"routerLink": "/timeline"
}
},
{
"name": "Tree",
"routerLink": "/tree"
},
{
"name": "TreeTable",
"routerLink": "/treetable"
}
]
},
{
Expand Down

1 comment on commit 2585e7c

@vercel
Copy link

@vercel vercel bot commented on 2585e7c Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

primeng – ./

primeng-git-prod-primetek.vercel.app
primeng-primetek.vercel.app
primeng.org

Please sign in to comment.