The ButtonStyle protocol is used to customize a button’s appearance. To configure the button style for a view, we create a struct, conforming ButtonStyle protocol, and then we use the buttonStyle(_:) modifier to apply the newly created style. The ButtonStyle protocol requires the makeBody(configuration: Configuration) function to be implemented where…