From 4dca46d2f2234182c2bb6dea803e7465ebcabef1 Mon Sep 17 00:00:00 2001 From: Jochem Smit Date: Tue, 19 Nov 2024 17:44:43 +0100 Subject: [PATCH] add mwe / testing example --- examples/mwe_solara.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/mwe_solara.py diff --git a/examples/mwe_solara.py b/examples/mwe_solara.py new file mode 100644 index 0000000..c8390f1 --- /dev/null +++ b/examples/mwe_solara.py @@ -0,0 +1,20 @@ +import solara +from ipymolstar import PDBeMolstar + + +@solara.component +def Page(): + expanded = solara.use_reactive(True) + + with solara.Sidebar(): + solara.Checkbox(label="Expanded", value=expanded) + + with solara.Card(style={"width": "500px"}): + PDBeMolstar.element( + hide_controls_icon=True, + hide_expand_icon=True, + hide_settings_icon=True, + hide_selection_icon=True, + molecule_id="1qyn", + expanded=expanded.value, + )