Hi,
I would like to ask how to change fontWeight of a button label within ButtonStyle. However I can't figure it how to do it.
This is my code:
Thanks for your help
I would like to ask how to change fontWeight of a button label within ButtonStyle. However I can't figure it how to do it.
This is my code:
Code Block swift struct CapsuleButtonStyle: ButtonStyle { func makeBody(configuration: Self.Configuration) -> some View { configuration.label .font(.footnote) .fontWeight(.bold) /* All modifiers work except this one*/ .foregroundColor(.white) .padding(.horizontal, 11) .padding(.vertical, 6) .background(Color.blue) .cornerRadius(.infinity) } }
Thanks for your help