-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add remaining examples for express API reference (#1093)
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
- Loading branch information
Showing
90 changed files
with
1,990 additions
and
411 deletions.
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Import the custom renderer implementations | ||
from renderers import render_capitalize, render_upper | ||
|
||
from shiny.express import input, ui | ||
|
||
ui.h1("Capitalization renderer") | ||
ui.input_text("caption", "Caption:", "Data summary") | ||
|
||
"@render_upper:" | ||
|
||
|
||
# Hovering over `@render_upper` will display the class documentation | ||
@render_upper | ||
def upper(): | ||
return input.caption() | ||
|
||
|
||
"@render_upper():" | ||
|
||
|
||
# Hovering over `@render_upper` will display the class documentation as there is no | ||
# `__init__()` documentation | ||
@render_upper() | ||
def upper_with_paren(): | ||
return input.caption() | ||
|
||
|
||
"@render_capitalize:" | ||
|
||
|
||
# Hovering over `@render_capitalize` will display the class documentation | ||
@render_capitalize | ||
def cap_upper(): | ||
return input.caption() | ||
|
||
|
||
"@render_capitalize(to='lower'): " | ||
|
||
|
||
# Hovering over `@render_capitalize` will display the `__init__()` documentation | ||
@render_capitalize(to_case="lower") | ||
def cap_lower(): | ||
return input.caption() |
Oops, something went wrong.