Skip to content

<comments-for-comment>

Usage

  1. If you haven't already, go through the setup for the module.

  2. Import the <comments-for-comment> element somewhere in the javascript side of your web-app like this:

js
import '@darksoil-studio/comments/dist/elements/comments-for-comment.js'
  1. Use it in the html side of your web-app like this:
html
<comments-for-comment .commentHash=${ commentHash }>
</comments-for-comment>
html
<comments-for-comment commentHash={ commentHash }>
</comments-for-comment>
html
<comments-for-comment [commentHash]="commentHash">
</comments-for-comment>
html
<comments-for-comment :commentHash="commentHash">
</comments-for-comment>
html
<comments-for-comment comment-hash={encodeHashToBase64(commentHash)}>
</comments-for-comment>

WARNING

Like all the elements in this module, <comments-for-comment> needs to be placed inside an initialized <comments-context>.

Demo

Here is an interactive demo of the element:

API Reference

<comments-for-comment> is a custom element, which means that it can be used in any web app or website. Here is the reference for its API: