How to use ngx-tethys - 4 common examples

To help you get started, we’ve selected a few ngx-tethys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atinc / ngx-tethys / demo / src / app / components / +popover / basic / popover-basic.component.ts View on Github external
<span>有图标</span>
                    
                
            
        
    `,
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class DemoPopoverContentComponent {}

@Component({
    selector: 'app-demo-popover-basic',
    templateUrl: './popover-basic.component.html'
})
export class DemoPopoverBasicComponent extends mixinUnsubscribe(MixinBase) implements OnInit {
    placement: ThyPlacement = 'bottom';
    trigger = 'click';

    constructor(private thyPopover: ThyPopover, private viewContainerRef: ViewContainerRef, private ngZone: NgZone) {
        super();
    }

    ngOnInit() {}

    openPopover(element: { elementRef: ElementRef }) {
        this.thyPopover.open(DemoPopoverContentComponent, {
            origin: element.elementRef,
            placement: this.placement
        });
    }
github atinc / ngx-tethys / demo / src / app / components / +skeleton / title / skeleton-title.component.ts View on Github external
import {
    OnInit,
    Component,
    TemplateRef,
    ViewContainerRef,
    NgZone,
    ChangeDetectionStrategy,
    ElementRef
} from '@angular/core';
import { mixinUnsubscribe, MixinBase } from 'ngx-tethys/core';

@Component({
    selector: 'app-demo-skeleton-title',
    templateUrl: './skeleton-title.component.html'
})
export class DemoSkeletonTitleComponent extends mixinUnsubscribe(MixinBase) implements OnInit {
    width = 100;

    height = 10;

    ngOnInit(): void {}
}
github atinc / ngx-tethys / demo / src / app / components / +skeleton / paragraph / skeleton-paragraph.component.ts View on Github external
import {
    OnInit,
    Component,
    TemplateRef,
    ViewContainerRef,
    NgZone,
    ChangeDetectionStrategy,
    ElementRef
} from '@angular/core';
import { mixinUnsubscribe, MixinBase } from 'ngx-tethys/core';

@Component({
    selector: 'app-demo-skeleton-paragraph',
    templateUrl: './skeleton-paragraph.component.html'
})
export class DemoSkeletonParagraphComponent extends mixinUnsubscribe(MixinBase) implements OnInit {
    params: {
        width?: number | string;
        height?: number | string;
        viewBoxWidth?: number | string;
        viewBoxHeight?: number | string;
        primaryColor?: string;
        secondaryColor?: string;
        preserveAspectRatio?: string;
    } = {
        width: '100%',
        height: '100%',
        primaryColor: '#f0f0f0',
        secondaryColor: '#e0e0e0',
        viewBoxWidth: 400,
        viewBoxHeight: 130,
        preserveAspectRatio: 'none'
github atinc / ngx-tethys / demo / src / app / components / +tree / basic / tree-basic.component.ts View on Github external
onDragDrop(event: ThyDragDropEvent) {
        let afterId: string;
        const suiteId: string = event.previousItem.origin._id;
        const parenId: string =
            event.position === ThyDropPosition.in ? event.item.origin._id : event.item.parentNode.origin._id;
        const newIndex = event.currentIndex;
        if (newIndex === 0) {
            afterId = '';
        } else {
            afterId = event.containerItems[event.currentIndex - 1].origin._id;
        }
    }

ngx-tethys

Fast and reliable Tethys Design components for Angular by Worktile & PingCode FE Team.

MIT
Latest version published 13 days ago

Package Health Score

79 / 100
Full package analysis