Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hideTryIt="false" hides the Try It section #2755

Open
Minucia opened this issue Dec 12, 2024 · 0 comments
Open

hideTryIt="false" hides the Try It section #2755

Minucia opened this issue Dec 12, 2024 · 0 comments

Comments

@Minucia
Copy link

Minucia commented Dec 12, 2024

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.
image

Expected Behavior

When hideTryIt is set to false, the Try It section should be shown.
image

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

  1. Add @stoplight/elements to a (Docusaurus) project via npm.
  2. 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"/>
  1. Take a look at the endpoint in the API reference. The Try It section is not shown:
    image

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant