@@ -35,15 +35,15 @@ deno add @kt3k/cell
3535## Hello world
3636
3737``` ts
38- import { type Context , register } from " @kt3k/cell" ;
38+ import { type Context , register } from " @kt3k/cell"
3939
4040function MyComponent({ on }: Context ) {
4141 on (" click" , () => {
42- alert (" hello" );
43- });
42+ alert (" hello" )
43+ })
4444}
4545
46- register (MyComponent , " js-hello" );
46+ register (MyComponent , " js-hello" )
4747```
4848
4949```
@@ -58,15 +58,15 @@ The next component mirrors the input value of `<input>` element to another DOM
5858element.
5959
6060``` ts
61- import { type Context , register } from " @kt3k/cell" ;
61+ import { type Context , register } from " @kt3k/cell"
6262
6363function Mirroring({ on , query }: Context ) {
6464 on (" input" , () => {
65- query (" .dest" ).textContent = query (" .src" ).value ;
66- });
65+ query (" .dest" ).textContent = query (" .src" ).value
66+ })
6767}
6868
69- register (Mirroring , " js-mirroring" );
69+ register (Mirroring , " js-mirroring" )
7070```
7171
7272```
@@ -100,15 +100,15 @@ By calling `on.outside(event, handler)`, you can handle the event outside of the
100100component's DOM.
101101
102102``` ts
103- import { type Context , register } from " @kt3k/cell" ;
103+ import { type Context , register } from " @kt3k/cell"
104104
105105function OutsideClickComponent({ on }: Context ) {
106106 on .outside (" click" , ({ e }) => {
107- console .log (" The outside of my-component has been clicked!" );
108- });
107+ console .log (" The outside of my-component has been clicked!" )
108+ })
109109}
110110
111- register (OutsideClickComponent , " js-outside-click" );
111+ register (OutsideClickComponent , " js-outside-click" )
112112```
113113
114114## Using Cell directly from the browser
0 commit comments