Terms
Display content and a button that triggers an event
You can use Markdown within the content to format text.
const url = await webview.terms.create({
ref: 'terms',
onSelect: {
eventName: 'ACCEPTED'
},
title: 'Accept our terms of usage',
tint: '#000',
content: `
# Title
A simple paragraph with text
## Heading 2
- List item 1
- List item 2
- List item 3
`
})
Reference
Property | Type | Example | Description | Required |
---|---|---|---|---|
ref | string | news-article | If provided, the webview will update its content | |
tint | string | #FF0000 | Tint color used for the button | |
title | string | Select product | Descriptive titles are shown at the top | Yes |
onSelect.eventName | string | ACCEPTED | Event name to trigger when terms are accepted | Yes |
content | string | Lorem ipsum dolor... | Markdown supported content | Yes |
button.label | string | I agree and accept | Label of the confirmation button. |
Updated about 1 year ago