Skip to content

Commit d62845e

Browse files
committed
refactoring layout
1 parent 9c53a9b commit d62845e

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

src/app/shared/components/buttons/primary.component.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { Observable } from 'rxjs';
77
<button
88
[type]="type"
99
[disabled]="loading$ | async"
10-
class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-white border border-transparent rounded-md shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed transition ease-in-out duration-150"
11-
[ngClass]="class + this.themeClass()"
10+
class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 focus:ring-primary-500 border border-transparent rounded-md shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed transition ease-in-out duration-150"
11+
[ngClass]="class"
1212
matRipple
1313
matRippleColor="primary">
1414
<span *ngIf="loading$ | async">
@@ -39,21 +39,4 @@ export class ButtonPrimaryComponent {
3939
@Input() loading$!: Observable<boolean>;
4040

4141
@Input() class!: string;
42-
43-
@Input() theme: string = 'primary';
44-
45-
public themeClass(theme: string): string {
46-
switch (theme) {
47-
case 'primary':
48-
return 'bg-primary-600 hover:bg-primary-700 focus:ring-primary-500';
49-
case 'secondary':
50-
return 'bg-secondary-600 hover:bg-secondary-700 focus:ring-secondary-500';
51-
case 'success':
52-
return 'bg-green-600 hover:bg-green-700 focus:ring-green-500';
53-
case 'danger':
54-
return 'bg-red-600 hover:bg-red-700 focus:ring-red-500';
55-
default:
56-
return 'bg-transparent hover:bg-slate-50 focus:ring-slate-900';
57-
}
58-
}
5942
}

src/app/shared/themes/layouts/auth/auth.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<router-outlet></router-outlet>
55

66
<div class="flex items-center justify-between py-6">
7-
<p class="text-sm leading-5 text-slate-500">Copyright © {{ date }} Admin Panel.</p>
7+
<p class="text-sm leading-5 text-slate-500">Copyright © {{ date }} Laravel Cameroun.</p>
88
<div class="flex items-center space-x-5">
99
<a href="https://www.facebook.com/laravelcm" target="_blank" class="text-slate-400 hover:text-slate-500">
1010
<span class="sr-only">Facebook</span>

0 commit comments

Comments
 (0)