I am trying to achieve a Scrollview with buttons that have rounded corners and a custom color.
Button(shoppingListItem.text) {
removeFromShoppingList(itemId: shoppingListItem.item_id)
}
.overlay(
RoundedRectangle(cornerRadius: 20)
.stroke(Color.secondary, lineWidth: 2)
.background(
RoundedRectangle(cornerRadius: 20, style: .continuous)
.fill(Color("ShoppingListItemColor"))
)
)
)
This results in a button with rounded corners and the wanted color but no text is visible. What am I missing here?