mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-13 15:06:24 +08:00
Modify kino button example to render the button (#1811)
This commit is contained in:
parent
bd41b5b178
commit
b4504e342c
1 changed files with 5 additions and 2 deletions
|
@ -55,8 +55,11 @@ the main way to interact with controls is by listening to their
|
||||||
events.
|
events.
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
Kino.Control.button("Click me!")
|
button = Kino.Control.button("Click me!")
|
||||||
|> Kino.listen(fn event -> IO.inspect(event) end)
|
```
|
||||||
|
|
||||||
|
```elixir
|
||||||
|
Kino.listen(button, fn event -> IO.inspect(event) end)
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- livebook:{"branch_parent_index":0} -->
|
<!-- livebook:{"branch_parent_index":0} -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue