refactor: convierte los inputs con accessor a signals (input/model + effect)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ChangeDetectionStrategy, Component, HostBinding, Input, input } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, HostBinding, input } from '@angular/core';
|
||||
import { buttonSize, mode } from '../../../styles';
|
||||
import { PiBaseButtonComponent } from '../base-button.component';
|
||||
import { NgIf } from '@angular/common';
|
||||
@@ -19,7 +19,7 @@ export class PiActionButtonComponent extends PiBaseButtonComponent {
|
||||
|
||||
readonly previous = input(false);
|
||||
override readonly size = input<buttonSize>('medium');
|
||||
@Input() text: string | undefined;
|
||||
readonly text = input<string>();
|
||||
readonly hasPadding = input(true);
|
||||
readonly hasIcon = input(true);
|
||||
readonly label = input<string>();
|
||||
@@ -44,7 +44,7 @@ export class PiActionButtonComponent extends PiBaseButtonComponent {
|
||||
}
|
||||
|
||||
get textClass(): string | null {
|
||||
return this.text ? 'has-text' : null;
|
||||
return this.text() ? 'has-text' : null;
|
||||
}
|
||||
|
||||
get fontWeightClass(): string | null {
|
||||
|
||||
Reference in New Issue
Block a user