Skip to content
Snippets Groups Projects
Commit 8bcce03e authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5789 use required

parent 9cc5624f
No related branches found
No related tags found
No related merge requests found
...@@ -28,10 +28,7 @@ type TextInputVariants = VariantProps<typeof textInputVariants>; ...@@ -28,10 +28,7 @@ type TextInputVariants = VariantProps<typeof textInputVariants>;
template: ` template: `
<div> <div>
<label [for]="id" class="text-md mb-2 block font-medium text-text" <label [for]="id" class="text-md mb-2 block font-medium text-text"
>{{ label >{{ label }}<ng-container *ngIf="required"><i aria-hidden="true">*</i></ng-container></label
}}<ng-container *ngIf="required"
><i aria-hidden="true">*</i><i class="sr-only">(erforderlich)</i></ng-container
></label
> >
<div class="mt-2"> <div class="mt-2">
<input <input
...@@ -41,7 +38,7 @@ type TextInputVariants = VariantProps<typeof textInputVariants>; ...@@ -41,7 +38,7 @@ type TextInputVariants = VariantProps<typeof textInputVariants>;
[ngClass]="textInputVariants({ variant })" [ngClass]="textInputVariants({ variant })"
[placeholder]="placeholder" [placeholder]="placeholder"
[autocomplete]="autocomplete" [autocomplete]="autocomplete"
[attr.aria-required]="required" [required]="required"
/> />
</div> </div>
<ng-content select="[error]"></ng-content> <ng-content select="[error]"></ng-content>
......
...@@ -27,10 +27,7 @@ type TextareaVariants = VariantProps<typeof textareaVariants>; ...@@ -27,10 +27,7 @@ type TextareaVariants = VariantProps<typeof textareaVariants>;
template: ` template: `
<div class="mt-2"> <div class="mt-2">
<label [for]="id" class="text-md mb-2 block font-medium text-text" <label [for]="id" class="text-md mb-2 block font-medium text-text"
>{{ label >{{ label }}<ng-container *ngIf="required"><i aria-hidden="true">*</i></ng-container></label
}}<ng-container *ngIf="required"
><i aria-hidden="true">*</i><i class="sr-only">(erforderlich)</i></ng-container
></label
> >
<textarea <textarea
[id]="id" [id]="id"
...@@ -39,7 +36,7 @@ type TextareaVariants = VariantProps<typeof textareaVariants>; ...@@ -39,7 +36,7 @@ type TextareaVariants = VariantProps<typeof textareaVariants>;
[ngClass]="textareaVariants({ variant })" [ngClass]="textareaVariants({ variant })"
[placeholder]="placeholder" [placeholder]="placeholder"
[autocomplete]="autocomplete" [autocomplete]="autocomplete"
[attr.aria-required]="required" [required]="required"
></textarea> ></textarea>
<ng-content select="[error]"></ng-content> <ng-content select="[error]"></ng-content>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment