hideTryIt is greedy - Is it possible to hide the Try It panel, but keep the Examples panel?
When setting the hideTryIt configuration in the element-api section like hideTryIt = "true", the inverted panel (with the dark background) is removed, but so too is the examples panel. Is it possible to just remove the panel with the Send API Request button in it but keep the examples? The 'response example' panel remains visible in both cases.
I've just discovered this project and it is great for my needs - thank you!
- Version used: https://unpkg.com/@stoplight/elements/web-components.min.js
I have similar needs, for the time being, one way to hide it is adding the following CSS to the HTML page:
<style> .SendButtonHolder { display: none; visibility: hidden; } </style>
This would be greatly appreciated. Although I'd like to hide the full TryIt panel and keep the full Request example panel that is below it.
Try this code in your javascript:
const windowLoad = () => {
setTimeout(() => {
removeTestButton();
}, 10);
};
const removeTestButton = () => {
const button = document.querySelector(".SendButtonHolder").children[0];
button.remove();
};
window.addEventListener("load", windowLoad);
window.addEventListener("hashchange", removeTestButton);