Skip to content

Commit 0b7d26d

Browse files
committed
docs: fixup examples
1 parent d9510cd commit 0b7d26d

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

shiny/ui/_toast.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from htmltools import Tag, TagAttrs, TagAttrValue, TagChild, TagList, div, tags
99

10-
from .._docstring import add_example, no_example
10+
from .._docstring import add_example
1111
from .._typing_extensions import NotRequired
1212
from .._utils import rand_hex
1313
from ..session import require_active_session
@@ -374,7 +374,7 @@ def toast_header(
374374
Examples
375375
--------
376376
377-
See :func:`~shiny.ui.show_toast` for a complete example, including a toast with a
377+
See :func:`~shiny.ui.toast` for a complete example, including a toast with a
378378
header.
379379
380380
See Also
@@ -402,7 +402,6 @@ def toast_header(
402402
# ==============================================================================
403403

404404

405-
@add_example()
406405
def show_toast(
407406
toast: str | Toast,
408407
*,
@@ -429,6 +428,12 @@ def show_toast(
429428
The toast ID (for use with :func:`~shiny.ui.hide_toast`), or an empty string if
430429
the toast has no content (and no action is taken).
431430
431+
Examples
432+
--------
433+
434+
See :func:`~shiny.ui.toast` for a complete example, including showing and hiding
435+
toast notifications.
436+
432437
See Also
433438
--------
434439
* :func:`~shiny.ui.toast`
@@ -455,7 +460,6 @@ def show_toast(
455460
return payload["id"]
456461

457462

458-
@no_example()
459463
def hide_toast(
460464
id: str | Toast,
461465
*,
@@ -482,9 +486,12 @@ def hide_toast(
482486
* :func:`~shiny.ui.show_toast`
483487
* :func:`~shiny.ui.toast`
484488
485-
Example
486-
-------
487-
See :func:`~shiny.ui.show_toast`.
489+
490+
Examples
491+
--------
492+
493+
See :func:`~shiny.ui.toast` for a complete example, including showing and hiding
494+
toast notifications.
488495
"""
489496
session = require_active_session(session)
490497

0 commit comments

Comments
 (0)