MCPcopy
hub / github.com/StructuredLabs/preswald / sidebar

Function sidebar

preswald/interfaces/components.py:785–803  ·  view source on GitHub ↗

Create a sidebar component with optional logo and name.

(
    defaultopen: bool = False,
    component_id: str | None = None,
    logo: str | None = None,
    name: str | None = None,
    **kwargs
)

Source from the content-addressed store, hash-verified

783
784@with_render_tracking("sidebar")
785def sidebar(
786 defaultopen: bool = False,
787 component_id: str | None = None,
788 logo: str | None = None,
789 name: str | None = None,
790 **kwargs
791) -> ComponentReturn:
792 """Create a sidebar component with optional logo and name."""
793 component = {
794 "type": "sidebar",
795 "id": component_id,
796 "defaultopen": defaultopen,
797 "branding": {"logo": logo, "name": name},
798 }
799
800 logger.debug(
801 f"[sidebar] ID={component_id}, defaultopen={defaultopen}, logo={logo}, name={name}"
802 )
803 return ComponentReturn(component, component)
804
805
806@with_render_tracking("table")

Callers 2

sidebar_demoFunction · 0.90
hello.pyFile · 0.90

Calls 1

ComponentReturnClass · 0.90

Tested by

no test coverage detected