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

Change RightPanel spacing for schema imports only #166

Open
rohit-gohri opened this issue Apr 6, 2022 Discussed in #165 · 1 comment
Open

Change RightPanel spacing for schema imports only #166

rohit-gohri opened this issue Apr 6, 2022 Discussed in #165 · 1 comment
Assignees
Labels
enhancement New feature or request styles

Comments

@rohit-gohri
Copy link
Owner

Discussed in #165

Originally posted by erodewald April 5, 2022
The default theme of redoc has a lot of spacing built in, but when I include a schema import with the example enabled, there's too little horizontal space, which results in a lot of scrolling in my example.

I was hoping that I could pass in some additional props into the React component, but it seems to have no effect.

<ApiSchema
	id="diagnostics"
	example
	pointer="#/components/schemas/DiagnosticLifecycleEvent"
	exampleRef="#/components/examples/simulatedLifecycleEvent"
        theme={{spacing:{unit:0}}}                                   <!-- attempt 1 -->
        options={{theme:{spacing:{unit:0,sectionHorizontal:20}}}}    <!-- attempt 2 -->
/>

I'm using the following line as a clue that this is possible:

Along with this from redocly, which seems to correlate:
https://github.com/Redocly/redoc/blob/a160498089a44ebf540745b55fbaf18a54eb9d88/src/components/SchemaDefinition/SchemaDefinition.tsx?ts=2#L86

I am probably way off, let me know if you have any ideas.

@rohit-gohri rohit-gohri self-assigned this Apr 6, 2022
@rohit-gohri rohit-gohri added the enhancement New feature or request label Apr 6, 2022
@stv0g
Copy link

stv0g commented Aug 12, 2023

I am facing the same issue while attempting to pass the schemaExpansionLevel option to an <ApiSchema> component.

Do you have any idea how to achieve this either for a single instance or globally? The redocly.yaml config file does not seem to work either for <ApiSchema> components :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request styles
Projects
None yet
Development

No branches or pull requests

2 participants