Skip to content

Commit

Permalink
update theme demo
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 committed Nov 7, 2021
1 parent 057b227 commit 00d574f
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions demos/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ def main(): # PyWebIO application function
dict(label=i, value=i, color=i)
for i in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark']
], onclick=lambda b: toast(f'Clicked {b} button'), outline=True)

put_buttons([
dict(label=i, value=i, color=i)
for i in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark']
], onclick=lambda b: toast(f'Clicked {b} button'), group=True)
with put_scrollable(border=False, height=None):
put_buttons([
dict(label=i, value=i, color=i)
for i in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark']
], onclick=lambda b: toast(f'Clicked {b} button'), group=True)
###########################################################################################
put_markdown('# Tables')
put_markdown("""
Expand Down Expand Up @@ -258,13 +258,14 @@ def show_popup():
put_markdown('# Loading')
put_processbar('processbar', 0.3)
put_text()
put_grid([
[
put_loading(shape=shape, color=color)
for color in ('primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark')
]
for shape in ('border', 'grow')
], cell_width='50px', cell_height='50px')
with put_scrollable(border=False, height=None):
put_grid([
[
put_loading(shape=shape, color=color)
for color in ('primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark')
]
for shape in ('border', 'grow')
], cell_width='50px', cell_height='50px')
###########################################################################################
put_markdown('# Tabs')

Expand Down Expand Up @@ -361,6 +362,7 @@ def page():
The sketchy, minty and yeti theme are from [bootswatch](https://bootswatch.com/4/).
""", lstrip=True)

set_env(input_panel_min_height=100, input_panel_init_height=190)
output_widgets()
pin_widgets()
form()
Expand Down

0 comments on commit 00d574f

Please sign in to comment.