/
TestEntry
/
mt-app
Обзор
Документация
Войти
/
TestEntry
/
mt-app
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
projects/ui-kit/src/lib/button/mt-kit-button.component.ts
28 строк
837 B
PontiyPirat
feat(ui-kit): messenger UI on @ui-kit and shared design tokens
02 май 2026, 17:54
02 май 2026, 17:54
72f7d1f
Код
Авторство
О чём код?
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core'; export type MtKitButtonVariant = 'primary' | 'secondary' | 'text'; @Component({ selector: 'mt-kit-button', standalone: true, template: ` <button [attr.type]="type()" [disabled]="disabled()" [class]="buttonClasses()"> <ng-content /> </button> `, styleUrl: './mt-kit-button.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class.mt-kit-button--block]': 'block()', }, }) export class MtKitButtonComponent { readonly type = input<'button' | 'submit' | 'reset'>('button'); readonly disabled = input(false); readonly variant = input<MtKitButtonVariant>('secondary'); readonly block = input(false); protected readonly buttonClasses = computed( () => `mt-kit-button mt-kit-button--${this.variant()}` ); }