UI_CommentUI typedef
UI_CommentUI = BaseSlot
Use this to customize comment or its slots.
Example:
Customize the entire comment:
```ts
NutrientViewer.load({
// ... Your configuration.
ui: {
commentThread: {
comment: () => {
return {
render: () => {
const div = document.createElement("div");
div.style.backgroundColor = "hotpink";
div.style.padding = "5px";
div.innerText = "This is a custom comment.";
return div;
},
};
},
},
},
});
Example:
```ts
Customize the `header` slot within a comment:
```ts
NutrientViewer.load({
// ... Your configuration.
ui: {
commentThread: {
comment: {
header: () => {
return {
render: () => {
const div = document.createElement("div");
div.style.backgroundColor = "hotpink";
div.style.padding = "5px";
div.innerText = "This is a custom header for a comment.";
return div;
},
};
},
},
},
},
});
Implementation
typedef UI_CommentUI = BaseSlot;