@@ -364,10 +364,10 @@ class TryExamplesDirective(SphinxDirective):
364364 has_content = True
365365 required_arguments = 0
366366 option_spec = {
367+ "height" : directives .unchanged ,
367368 "theme" : directives .unchanged ,
368369 "button_text" : directives .unchanged ,
369370 "example_class" : directives .unchanged ,
370- "min_height" : directives .unchanged ,
371371 }
372372
373373 def run (self ):
@@ -380,8 +380,8 @@ def run(self):
380380 )
381381
382382 button_text = self .options .pop ("button_text" , "Try it with Jupyterlite!" )
383+ height = self .options .pop ("height" , None )
383384 example_class = self .options .pop ("example_class" , "" )
384- min_height = self .options .pop ("min_height" , "200px" )
385385
386386 # We need to get the relative path back to the documentation root from
387387 # whichever file the docstring content is in.
@@ -456,7 +456,7 @@ def run(self):
456456 '<button class="try_examples_button" '
457457 f"onclick=\" window.tryExamplesShowIframe('{ examples_div_id } ',"
458458 f"'{ iframe_div_id } ','{ iframe_parent_div_id } ','{ iframe_src } ',"
459- f"'{ min_height } ')\" >"
459+ f"'{ height } ')\" >"
460460 f"{ button_text } </button>"
461461 "</div>"
462462 )
@@ -499,7 +499,6 @@ def _process_autodoc_docstrings(app, what, name, obj, options, lines):
499499 "theme" : app .config .try_examples_global_theme ,
500500 "button_text" : app .config .try_examples_global_button_text ,
501501 "example_class" : app .config .try_examples_global_example_class ,
502- "min_height" : app .config .try_examples_global_min_height ,
503502 }
504503 try_examples_options = {
505504 key : value for key , value in try_examples_options .items () if value is not None
@@ -608,10 +607,6 @@ def setup(app):
608607
609608 app .add_config_value ("global_enable_try_examples" , default = False , rebuild = True )
610609 app .add_config_value ("try_examples_global_theme" , default = None , rebuild = True )
611- app .add_config_value (
612- "try_examples_global_example_class" , default = None , rebuild = "html"
613- )
614- app .add_config_value ("try_examples_global_min_height" , default = None , rebuild = "html" )
615610 app .add_config_value (
616611 "try_examples_global_button_text" ,
617612 default = None ,
0 commit comments