comparison Simoleon/Helpers/FavouriteButton.swift @ 26:337816652bfe

Add haptics
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Tue, 20 Jul 2021 12:23:37 +0100
parents 3596690dda73
children d95582268b44
comparison
equal deleted inserted replaced
25:933d9ab04374 26:337816652bfe
14 14
15 var body: some View { 15 var body: some View {
16 Button(action: { 16 Button(action: {
17 if isFavourite() { 17 if isFavourite() {
18 removeFromFavourites() 18 removeFromFavourites()
19 simpleSuccess()
19 } else { 20 } else {
20 addToFavourites() 21 addToFavourites()
22 simpleSuccess()
21 } 23 }
22 }) { 24 }) {
23 RoundedRectangle(cornerRadius: 25) 25 RoundedRectangle(cornerRadius: 25)
24 .foregroundColor(Color(.secondarySystemBackground)) 26 .foregroundColor(Color(.secondarySystemBackground))
25 .frame(width: 65, height: 65) 27 .frame(width: 65, height: 65)