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