setState({ showCoupon: true }) }>
Add a discount coupon
) : (
Coupon code form here!
)}
```
--------------------------------
### ToastProvider Setup and ToastConsumer Usage
Source: https://github.com/vtex/styleguide/blob/master/react/components/ToastProvider/README.md
Wrap your application with ToastProvider and use ToastConsumer to access the showToast function for displaying messages. This example demonstrates showing simple text toasts and toasts with an action button.
```javascript
import { useState } from 'react'
const Button = require('../Button').default
const ToastConsumer = require('./index').ToastConsumer
const App = () => (
// Wrap the entire application on a toast provider
)
const Content = () => {
const [count, setCount] = useState(0)
return(
// Wrap the components that are going to display toasts
// on a ToastConsumer, with a function as a child, as
// the example below: