Skip to content
Snippets Groups Projects
Commit a5733981 authored by Marlène SIMONDANT's avatar Marlène SIMONDANT
Browse files

adapt yes-no component to reflect changes better

parent 12d1c887
No related branches found
No related tags found
1 merge request!949change(profile): prevent rdv choice if user has no personal offer
Pipeline #116876 passed
<div class="content">
<app-tag-item
[iconName]="selected ? 'check' : null"
[iconName]="selected === true ? 'check' : null"
[label]="'Oui'"
[color]="selected ? 'black' : 'white'"
[color]="selected === true ? 'black' : 'white'"
[clickable]="true"
(action)="selected = true; clicked()"
(action)="clicked(true)"
/>
<app-tag-item
[iconName]="selected !== null && !selected ? 'check' : null"
[iconName]="selected === false ? 'check' : null"
[label]="'Non'"
[color]="selected !== null && !selected ? 'black' : 'white'"
[color]="selected === false ? 'black' : 'white'"
[clickable]="true"
(action)="selected = false; clicked()"
(action)="clicked(false)"
/>
</div>
......@@ -7,11 +7,10 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
})
export class YesNoComponent {
/** Selected or not */
@Input({ required: true }) selected: boolean = null;
@Input() selected: boolean | null = null;
@Output() selectedEvent = new EventEmitter<boolean>();
public clicked(): void {
this.selectedEvent.emit(this.selected);
public clicked(value: boolean): void {
this.selectedEvent.emit(value);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment