-
-
Notifications
You must be signed in to change notification settings - Fork 665
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
995c886
commit 5fa1917
Showing
1 changed file
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
from nicegui import ui | ||
|
||
from ..tools import text_demo | ||
|
||
|
||
def main_demo() -> None: | ||
ui.button('NiceGUI Logo', on_click=lambda: ui.download('https://nicegui.io/logo.png')) | ||
ui.button('Logo', on_click=lambda: ui.download('https://nicegui.io/logo.png')) | ||
|
||
|
||
def more() -> None: | ||
@text_demo('Download raw bytes from memory', ''' | ||
The `download` function can also be used to download raw bytes from memory. | ||
''') | ||
def raw_bytes(): | ||
ui.button('Download', on_click=lambda: ui.download(b'Hello World', 'hello.txt')) |