@@ -69,61 +69,49 @@ view. In a Jupyter Notebook it will appear in an output cell. If you're running
6969Slideshow
7070---------
7171
72- .. literalinclude :: examples/slideshow.py
73-
7472Try clicking the image 🖱️
7573
76- .. interactive-widget :: slideshow
74+ .. example :: slideshow
7775
7876
7977Click Counter
8078-------------
8179
82- .. literalinclude :: examples/click_count.py
83-
84- .. interactive-widget :: click_count
80+ .. example :: click_count
8581
8682
8783To Do List
8884----------
8985
90- .. literalinclude :: examples/todo.py
91-
9286Try typing in the text box and pressing 'Enter' 📋
9387
94- .. interactive-widget :: todo
88+ .. example :: todo
9589
9690
9791The Game Snake
9892--------------
9993
100- .. literalinclude :: examples/snake_game.py
101-
10294Click to start playing and use the arrow keys to move 🎮
10395
10496Slow internet may cause inconsistent frame pacing 😅
10597
106- .. interactive-widget :: snake_game
98+ .. example :: snake_game
10799
108100
109101Matplotlib Plot
110102---------------
111103
112- .. literalinclude :: examples/matplotlib_plot.py
113-
114104Pick the polynomial coefficients (seperate each coefficient by a space) 🔢:
115105
116- .. interactive-widget :: matplotlib_plot
106+ .. example :: matplotlib_plot
117107
118108
119109Simple Dashboard
120110----------------
121111
122- .. literalinclude :: examples/simple_dashboard.py
123-
124112Try interacting with the sliders 📈
125113
126- .. interactive-widget :: simple_dashboard
114+ .. example :: simple_dashboard
127115
128116
129117Install Javascript Modules
@@ -137,31 +125,17 @@ Simply install your javascript library of choice using the ``idom`` CLI:
137125
138126 Then import the module with :class: `~idom.widgets.utils.Module `:
139127
140- .. literalinclude :: examples/victory_chart.py
141-
142- .. note ::
143-
144- It's possible to install the module at runtime by specifying ``install=True ``.
145- However this is generally discouraged.
146-
147- .. interactive-widget :: victory_chart
128+ .. example :: victory_chart
148129
149130
150131Define Javascript Modules
151132-------------------------
152133
153134Assuming you already installed ``victory `` as in the :ref: `Install Javascript Modules ` section:
154135
155- .. literalinclude :: examples/custom_chart.py
156-
157136Click the bars to trigger an event 👇
158137
159- .. interactive-widget :: custom_chart
160-
161- Source of ``chart.js ``:
162-
163- .. literalinclude :: examples/custom_chart.js
164- :language: javascript
138+ .. example :: custom_chart
165139
166140
167141Shared Client Views
@@ -199,23 +173,19 @@ Material UI Slider
199173
200174Assuming you already installed ``@material-ui/core `` as in the :ref: `Install Javascript Modules ` section:
201175
202- .. literalinclude :: examples/material_ui_slider.py
203-
204176Move the slider and see the event information update 👇
205177
206- .. interactive-widget :: material_ui_slider
178+ .. example :: material_ui_slider
207179
208180
209181Semantic UI Buttons
210182-------------------
211183
212184Assuming you already installed ``semantic-ui-react `` as in the :ref: `Install Javascript Modules ` section:
213185
214- .. literalinclude :: examples/primary_secondary_buttons.py
215-
216186Click the buttons and see the event information update 👇
217187
218- .. interactive-widget :: primary_secondary_buttons
188+ .. example :: primary_secondary_buttons
219189
220190
221191.. Links
0 commit comments