elements
elements copied to clipboard
`hideTryIt="false"` hides the Try It section
When integrating elements into a Docusaurus project, and setting hideTryIt="false", the Try It section is not shown.
Context
I want to set the value of the hideTryIt flag to make it configurable through code. But at the moment, the only way to show the Try It section is to not add the flag at all.
Current Behavior
When hideTryIt is set to false, the Try It section is not shown.
Expected Behavior
When hideTryIt is set to false, the Try It section should be shown.
Possible Workaround/Solution
The Try It section is shown when the hideTryIt config is not set at all (default is false). But that doesn't help when the flag needs to be set in code.
Steps to Reproduce
- Add @stoplight/elements to a (Docusaurus) project via npm.
- Integrate elements into a page by using the following code:
import { API } from '@stoplight/elements';
import '@stoplight/elements/styles.min.css';
<API apiDescriptionUrl="TrainTravelAPI.yaml" layout="stacked" hideTryIt="false"/>
- Take a look at the endpoint in the API reference. The Try It section is not shown:
Environment
- @stoplight/elements version 8.5.2
- node version 20.18.1
- Docusaurus version 3.5.2
- Chrome version 131.0.6778.109
- Windows 11