| | 1 | | using System; |
| | 2 | | using TMPro; |
| | 3 | | using UnityEngine; |
| | 4 | | using UnityEngine.UI; |
| | 5 | |
|
| | 6 | | namespace DCL.MyAccount |
| | 7 | | { |
| | 8 | | public class MyProfileAdditionalInfoEntryComponentView : MonoBehaviour |
| | 9 | | { |
| | 10 | | [SerializeField] private TMP_Text titleLabel; |
| | 11 | | [SerializeField] private TMP_Text valueLabel; |
| | 12 | | [SerializeField] private Button removeButton; |
| | 13 | |
|
| | 14 | | private string id; |
| | 15 | |
|
| | 16 | | public event Action<string> OnRemoved; |
| | 17 | |
|
| | 18 | | private void Awake() |
| | 19 | | { |
| 0 | 20 | | removeButton.onClick.AddListener(() => OnRemoved?.Invoke(id)); |
| 0 | 21 | | } |
| | 22 | |
|
| | 23 | | public void Set(string id, string title, string value) |
| | 24 | | { |
| 0 | 25 | | this.id = id; |
| 0 | 26 | | titleLabel.text = title; |
| 0 | 27 | | valueLabel.text = value; |
| 0 | 28 | | } |
| | 29 | | } |
| | 30 | | } |