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

OZG-5600-OZG-5715 revert button changes, use ods-button

parent 67551365
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,6 @@ type ButtonVariants = VariantProps<typeof buttonVariants>;
template: `<ods-button
[text]="text"
[type]="type"
[class]="class"
[size]="size"
[dataTestId]="dataTestId"
[isLoading]="isLoading"
......@@ -26,7 +25,6 @@ type ButtonVariants = VariantProps<typeof buttonVariants>;
export class ButtonWithSpinnerComponent implements OnInit {
@Input() text: string = '';
@Input() dataTestId: string = '';
@Input() class: string = '';
@Input() stateResource: StateResource<Resource>;
@Input() type: ButtonVariants['type'] = 'primary';
@Input() size: ButtonVariants['size'] = 'medium';
......
import { CommonModule } from '@angular/common';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { VariantProps, cva } from 'class-variance-authority';
import { twMerge } from 'tailwind-merge';
import { SpinnerIconComponent } from '../icons/spinner-icon/spinner-icon.component';
......@@ -31,9 +30,8 @@ type ButtonVariants = VariantProps<typeof buttonVariants>;
standalone: true,
imports: [CommonModule, SpinnerIconComponent],
template: `<button
[class]="class"
type="button"
[ngClass]="twMerge(buttonVariants({ size, type }), class)"
[ngClass]="buttonVariants({ size, type })"
[disabled]="isLoading"
[attr.aria-disabled]="isLoading"
[attr.aria-label]="text"
......@@ -48,7 +46,6 @@ type ButtonVariants = VariantProps<typeof buttonVariants>;
export class ButtonComponent {
@Input() text: string = '';
@Input() dataTestId: string = '';
@Input() class: string = '';
@Input() isLoading: boolean = false;
@Input() type: ButtonVariants['type'] = 'primary';
@Input() size: ButtonVariants['size'] = 'medium';
......@@ -56,5 +53,4 @@ export class ButtonComponent {
@Output() public clickEmitter: EventEmitter<MouseEvent> = new EventEmitter<MouseEvent>();
buttonVariants = buttonVariants;
twMerge = twMerge;
}
<ods-button
*ngIf="showButton$ | async"
(click)="clickEmitter.emit($event)"
type="primary"
size="medium"
class="mt-8 flex"
data-test-id="bescheid-weiter-button"
text="Weiter"
class="mt-8 min-w-0 px-8"
dataTestId="bescheid-weiter-button"
/>
>
</ods-button>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment