Skip to content

Commit

Permalink
docs: annotate quads-changed event
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Nov 25, 2024
1 parent 7185df6 commit 76843c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packages/rdf-snippet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ package.

## Events

| Event | Type |
|-----------------|-----------------------------------|
| `quads-changed` | `CustomEvent<{ value: any[]; }>` |
| `value-changed` | `CustomEvent<{ value: string; }>` |
| Event | Type | Description |
|-----------------|-----------------------------------|--------------------------------------------|
| `quads-changed` | `CustomEvent<{ value: Quad[] }>` | dispatched when the input quads are parsed |
| `value-changed` | `CustomEvent<{ value: string; }>` | |

## CSS Shadow Parts

Expand Down
5 changes: 3 additions & 2 deletions packages/rdf-snippet/custom-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@
{
"name": "quads-changed",
"type": {
"text": "CustomEvent"
}
"text": "CustomEvent<{ value: Quad[] }>"
},
"description": "dispatched when the input quads are parsed"
},
{
"name": "value-changed",
Expand Down
2 changes: 2 additions & 0 deletions packages/rdf-snippet/src/RdfSnippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ const formatLabels = {
* @csspart input - selection button for the input format
* @csspart output - selection button for the output formats
* @csspart selected - the currently selected format button
*
* @event {CustomEvent<{ value: Quad[] }>} quads-changed - dispatched when the input quads are parsed
*/
export class RdfSnippet extends LitElement {
static get properties() {
Expand Down

0 comments on commit 76843c2

Please sign in to comment.