added input

This commit is contained in:
2026-03-29 20:33:37 +01:00
parent dc4c751210
commit 092dd3b2b1
3 changed files with 11 additions and 13 deletions
@@ -4,7 +4,7 @@
Title
</h3>
<span class="col-span-1 text-right text-xs font-extrabold text-yellow-900 bg-amber-50 px-2 py-1 rounded-lg">
+8 pts
{{ tag() }}
</span>
</div>
<p class="text-[11px] text-gray-500 leading-relaxed">Description</p>
@@ -18,7 +18,7 @@
fill="clear"
class="m-0 p-0 min-h-0 text-[11px] font-black bg-black text-white rounded-3xl"
style="--padding-top: 4px; --padding-bottom: 4px;">
Voir ⭢
{{ action() }}
</ion-button>
</div>
</div>
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import {Component, input} from '@angular/core';
import {IonicModule} from "@ionic/angular";
@Component({
@@ -9,10 +9,8 @@ import {IonicModule} from "@ionic/angular";
IonicModule
]
})
export class ChallengeCardComponent implements OnInit {
constructor() { }
ngOnInit() {}
}
export class ChallengeCardComponent {
action = input.required<string>();
tag = input.required<string>();
color = input.required<string>();
}
+3 -3
View File
@@ -17,16 +17,16 @@
<ion-content style="--background: #f7f6f2;">
<div class="mt-4">
<app-title-part textInfo="Défi bonus du jour"></app-title-part>
<app-challenge-card></app-challenge-card>
<app-challenge-card action="Regarder" tag="+1 pts" color=""></app-challenge-card>
</div>
<div class="mt-4">
<app-title-part textInfo="Vote en attente"></app-title-part>
<app-challenge-card></app-challenge-card>
<app-challenge-card action="Voir" tag="Vote" color=""></app-challenge-card>
</div>
<div class="mt-4">
<app-title-part textInfo="Défis en cours"></app-title-part>
<app-challenge-card></app-challenge-card>
<app-challenge-card action="Participer" tag="Défis" color=""></app-challenge-card>
</div>
</ion-content>