"...components/input-elements/spell-correct.component.ts" did not exist on "f416ce1446fc937fef37e13fbb01966a1493e93e"
Newer
Older
import { Component, Input } from '@angular/core';
import { CheckboxElement } from 'common/models/elements/input-elements/checkbox';
import { FormElementComponent } from '../../directives/form-element-component.directive';
<div class="mat-form-field"
[style.width.%]="100"
[style.height.%]="100"
[style.background-color]="elementModel.styling.backgroundColor">
<mat-checkbox #checkbox class="example-margin"
[style.color]="elementModel.styling.fontColor"
[style.font-family]="elementModel.styling.font"
[style.font-size.px]="elementModel.styling.fontSize"
[style.font-weight]="elementModel.styling.bold ? 'bold' : ''"
[style.font-style]="elementModel.styling.italic ? 'italic' : ''"
[style.text-decoration]="elementModel.styling.underline ? 'underline' : ''"
(click)="elementModel.readOnly ? $event.preventDefault() : null">
<div [innerHTML]="elementModel.label | safeResourceHTML"></div>
</mat-checkbox>
<mat-error *ngIf="elementFormControl.errors && elementFormControl.touched"
{{elementFormControl.errors | errorTransform: elementModel}}
</mat-error>
</div>
`
/* TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version. */
:host ::ng-deep .mat-checkbox-layout {white-space: normal !important}`,
'.error-message { position: absolute; display: block; margin-top: 5px; font-size: 75% }'
export class CheckboxComponent extends FormElementComponent {
@Input() elementModel!: CheckboxElement;