Skip to content

Commit

Permalink
Fix: unwanted whitespace in inline element
Browse files Browse the repository at this point in the history
  • Loading branch information
rg-wood committed Jul 30, 2024
1 parent 013b66f commit a6d9c56
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grislyeye/link-preview",
"version": "0.0.1",
"version": "0.0.2",
"description": "Custom element to hover link previews",
"main": "link-preview.js",
"type": "module",
Expand Down
24 changes: 11 additions & 13 deletions src/link-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,18 @@ class LinkPreview extends LitElement {
}

render() {
return html`
<lion-tooltip>
<div slot="invoker">
<slot></slot>
return html`<lion-tooltip>
<div slot="invoker">
<slot></slot>
</div>
<div slot="content">
<div part="preview" id="preview">
<h2>${until(this.title())}</h2>
<p>${until(this.description())}</p>
</div>
<div slot="content">
<div part="preview" id="preview">
<h2>${until(this.title())}</h2>
<p>${until(this.description())}</p>
</div>
</div>
</lion-tooltip>
`
</div>
</lion-tooltip>`
}
}

Expand Down

0 comments on commit a6d9c56

Please sign in to comment.