changeset 2326:e9caffe926df

attribute 'nounlink' to save space
author drewp@bigasterisk.com
date Thu, 01 Jun 2023 18:30:25 -0700
parents 81b48e21ba46
children bbd79e655114
files light9/web/EditChoice.ts
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/EditChoice.ts	Thu Jun 01 14:47:35 2023 -0700
+++ b/light9/web/EditChoice.ts	Thu Jun 01 18:30:25 2023 -0700
@@ -62,6 +62,7 @@
 @customElement("edit-choice")
 export class EditChoice extends LitElement {
   @property() uri?: NamedNode
+  @property({ type: Boolean }) nounlink = false;
   static styles = [
     css`
       :host {
@@ -83,9 +84,12 @@
     `,
   ];
   render() {
+    const unlink = html`
+    <button @click=${this.unlink}>Unlink</button>
+    `
     return html`
       <resource-display .uri=${this.uri} rename></resource-display>
-      <button @click=${this.unlink}>Unlink</button>
+      ${this.nounlink ? html`` : unlink}
     `;
   }