@parsonic/share-button
Version:
Native share button web component
118 lines (117 loc) • 3.08 kB
JSON
{
"schemaVersion": "2.1.0",
"readme": "README.md",
"modules": [
{
"kind": "javascript-module",
"path": "ShareButton.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "ShareButton",
"cssParts": [
{
"description": "Style the default button element",
"name": "button"
}
],
"slots": [
{
"description": "Slot for a custom button element",
"name": "button"
}
],
"members": [
{
"kind": "method",
"name": "register",
"static": true,
"parameters": [
{
"name": "tag",
"default": "'share-button'"
}
]
}
],
"events": [
{
"type": {
"text": "CustomEvent<ShareEventData>"
},
"description": "Event dispatched when the share button is pressed",
"name": "share"
},
{
"type": {
"text": "CustomEvent<SuccessResultDetail | ErrorResultDetail>"
},
"description": "Event dispatched when the share action is completed",
"name": "shareResult"
}
],
"attributes": [
{
"type": {
"text": "string"
},
"description": "The URL of the item to share",
"name": "data-url"
},
{
"type": {
"text": "string"
},
"description": "The title of the item to share",
"name": "data-title"
},
{
"type": {
"text": "string"
},
"description": "The text of the share message",
"name": "data-text"
},
{
"type": {
"text": "string"
},
"description": "Override for the name of the share event",
"name": "data-share-event-name"
},
{
"type": {
"text": "string"
},
"description": "Override for the name of the result event",
"name": "data-result-event-name"
}
],
"superclass": {
"name": "HTMLElement"
},
"customElement": true
}
],
"exports": [
{
"kind": "js",
"name": "default",
"declaration": {
"name": "ShareButton",
"module": "ShareButton.js"
}
},
{
"kind": "custom-element-definition",
"name": "share-button",
"declaration": {
"name": "ShareButton",
"module": "index.js"
}
}
]
}
]
}