mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
feat: docs app
This commit is contained in:
parent
713aff561e
commit
2129689f98
203 changed files with 15927 additions and 5 deletions
|
|
@ -0,0 +1,59 @@
|
|||
import { Component, Input } from '@angular/core';
|
||||
|
||||
import { NgxExampleView } from '../../enum.example-view';
|
||||
import { animate, animation, keyframes, style, transition, trigger, useAnimation } from '@angular/animations';
|
||||
|
||||
export const pulse = animation(
|
||||
animate(
|
||||
'{{ timing }}s {{ delay }}s',
|
||||
keyframes([
|
||||
style({ transform: 'scale3d(1, 1, 1)' }),
|
||||
style({ transform: 'scale3d({{ scale }}, {{ scale }}, {{ scale }})' }),
|
||||
style({ transform: 'scale3d(1, 1, 1)' }),
|
||||
]),
|
||||
),
|
||||
{ params: { scale: 1.02, timing: 0.5, delay: 0 } },
|
||||
);
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-stacked-example-block',
|
||||
template: `
|
||||
<div>
|
||||
<ngx-live-example-block [hidden]="!isLive"
|
||||
[@exampleState]="isLive ? 'live': 'code'"
|
||||
[content]="content"
|
||||
hasViewSwitch="true"
|
||||
(changeView)="changeView($event)">
|
||||
</ngx-live-example-block>
|
||||
|
||||
<ngx-tabbed-example-block [hidden]="isLive"
|
||||
[@exampleState]="isLive ? 'live': 'code'"
|
||||
[content]="content"
|
||||
hasViewSwitch="true"
|
||||
(changeView)="changeView($event)">
|
||||
</ngx-tabbed-example-block>
|
||||
</div>
|
||||
`,
|
||||
animations: [
|
||||
trigger('exampleState', [
|
||||
transition('live => code', [
|
||||
useAnimation(pulse),
|
||||
]),
|
||||
transition('code => live', [
|
||||
useAnimation(pulse),
|
||||
]),
|
||||
]),
|
||||
],
|
||||
})
|
||||
export class NgxStackedExampleComponent {
|
||||
|
||||
@Input() content: any;
|
||||
isLive = true;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
changeView(view: NgxExampleView) {
|
||||
this.isLive = view === NgxExampleView.LIVE;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue