I created a custom button in a seperate swiftView file and used it anywhere i want giving it a custom label. I am not getting an idea how to define its action differently everytime. For example, I want to add two variables in one view and refresh my list in the other. I have tried .onTap modifier but it does seems to work. If anyone can help me in this it would be a great for me.