12345678910111213141516171819202122232425262728 |
- import { AsyncPipe, NgClass } from '@angular/common';
- import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, signal } from '@angular/core';
- import * as i0 from "@angular/core";
- export class TabButtonComponent {
- constructor() {
- this.key = '';
- this.title = '';
- this.subTitle = '';
- this.clicked = new EventEmitter();
- this.isActive = signal(false);
- }
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: TabButtonComponent, isStandalone: true, selector: "ct-tab-button", inputs: { key: "key", title: "title", subTitle: "subTitle" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<div\n tabindex=\"0\"\n class=\"flex w-full cursor-pointer flex-col rounded-md p-1 text-center hover:bg-surface-variant dark:hover:bg-surface-variant-dark\"\n [ngClass]=\"{\n 'bg-surface dark:bg-surface-dark': isActive()\n }\"\n (click)=\"clicked.emit(key)\">\n <span class=\"font-bold\">{{ title }}</span>\n <p class=\"text-sm\">{{ subTitle }}</p>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
- }
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabButtonComponent, decorators: [{
- type: Component,
- args: [{ selector: 'ct-tab-button', standalone: true, imports: [NgClass, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n tabindex=\"0\"\n class=\"flex w-full cursor-pointer flex-col rounded-md p-1 text-center hover:bg-surface-variant dark:hover:bg-surface-variant-dark\"\n [ngClass]=\"{\n 'bg-surface dark:bg-surface-dark': isActive()\n }\"\n (click)=\"clicked.emit(key)\">\n <span class=\"font-bold\">{{ title }}</span>\n <p class=\"text-sm\">{{ subTitle }}</p>\n</div>\n" }]
- }], propDecorators: { key: [{
- type: Input,
- args: [{ required: true }]
- }], title: [{
- type: Input
- }], subTitle: [{
- type: Input
- }], clicked: [{
- type: Output
- }] } });
|