Screenshot

- This component is supposed to be shown after page load until a given date.
- The user can stop this component from being shown by
- either clicking on "Go to survey"
- or ticking the checkbox and clicking "No thanks"
- The information if it should be shown or not is stored in a cookie
- Note that this component comes with predefined title and body text.
API
The API of ewc-dialog applies to this element as well, because this element derives from ewc-dialog.
Additionally, there are the following attribs:
- cookieName - name of the cookie
- cookiePath - path of the cookie
- expiryutc - the dialog is shown only before this time (see example below for a UTC time string)
- url - opened in another tab when clicking "Go to survey" button
Note that the attribs are applied only initially - changing them at runtime has no effect.
Usage with WebPack
package.json
"dependencies": {
"@ewc-lib/ewc-dialog-feedback": "^0.1.0"
},
main.js
import "@ewc-lib/ewc-css/ewc.css"
import "@ewc-lib/ewc-dialog-feedback"
index.html
<ewc-dialog-feedback
cookieName="mySurvery"
cookiePath="/"
expiryutc="2525-01-01T12:53:00Z"
url="https://ec.europa.eu">
</ewc-dialog-feedback>