11"use client" ;
22
3- import { html } from "lit" ;
3+ import { html , nothing } from "lit" ;
44import { customElement , property , state } from "lit/decorators.js" ;
55
66import type { LitProps } from "../../../types/components.ts" ;
@@ -52,9 +52,11 @@ export class ExpandableBreakout extends SpeakeasyComponent {
5252
5353 @state ( )
5454 private isOpen = false ;
55- #setIsOpen = eventHandler ( "spk-toggle" , ( ) => ( this . isOpen = ! this . isOpen ) ) ;
55+ private handleToggle = eventHandler ( "spk-toggle" , ( ) => {
56+ this . isOpen = ! this . isOpen ;
57+ } ) ;
5658
57- override connectedCallback ( ) {
59+ public override connectedCallback ( ) {
5860 super . connectedCallback ( ) ;
5961 this . isOpen = ! ! this . expandByDefault ;
6062 hashManager ( this . id , ( open : boolean ) => {
@@ -74,7 +76,7 @@ export class ExpandableBreakout extends SpeakeasyComponent {
7476 >
7577 < slot name ="description "> </ slot >
7678 </ spk-connecting-cell > `
77- : null }
79+ : nothing }
7880 ${ this . hasSlot ( "examples" )
7981 ? html `< spk-connecting-cell
8082 bottom ="${ connection } "
@@ -83,7 +85,7 @@ export class ExpandableBreakout extends SpeakeasyComponent {
8385 >
8486 < slot name ="examples "> </ slot >
8587 </ spk-connecting-cell > `
86- : null }
88+ : nothing }
8789 ${ this . hasSlot ( "defaultValue" )
8890 ? html `< spk-connecting-cell
8991 bottom ="${ connection } "
@@ -92,7 +94,7 @@ export class ExpandableBreakout extends SpeakeasyComponent {
9294 >
9395 < slot name ="defaultValue "> </ slot >
9496 </ spk-connecting-cell > `
95- : null }
97+ : nothing }
9698 ${ this . hasSlot ( "embed" )
9799 ? html `< spk-connecting-cell
98100 bottom ="${ connection } "
@@ -101,7 +103,7 @@ export class ExpandableBreakout extends SpeakeasyComponent {
101103 >
102104 < slot name ="embed "> </ slot >
103105 </ spk-connecting-cell > `
104- : null } < slot name ="properties "> </ slot > `;
106+ : nothing } < slot name ="properties "> </ slot > `;
105107 }
106108
107109 return html `
@@ -110,7 +112,7 @@ export class ExpandableBreakout extends SpeakeasyComponent {
110112 ${ this . hasExpandableContent
111113 ? html `< spk-expandable-cell
112114 .isOpen ="${ this . isOpen } "
113- @spk-toggle ="${ this . #setIsOpen } "
115+ @spk-toggle ="${ this . handleToggle } "
114116 variant ="breakout "
115117 > </ spk-expandable-cell > `
116118 : html `< spk-non-expandable-cell > </ spk-non-expandable-cell > ` }
0 commit comments